From 338e88ab26d6652bd994cbf7a98da03e049e1e6b Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Tue, 26 Feb 2019 16:15:14 +1300 Subject: [PATCH] Make sure the permissions controller is displayed if the camera permissions are not determined. https://github.com/hyperoslo/Gallery/issues/141 --- Sources/Gallery/GalleryController.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/Gallery/GalleryController.swift b/Sources/Gallery/GalleryController.swift index f442b066..08dbf5cc 100644 --- a/Sources/Gallery/GalleryController.swift +++ b/Sources/Gallery/GalleryController.swift @@ -75,6 +75,9 @@ public class GalleryController: UIViewController, PermissionControllerDelegate { let useCamera = Permission.Camera.needsPermission && Permission.Camera.status == .authorized let tabsToShow = Config.tabsToShow.compactMap { $0 != .cameraTab ? $0 : (useCamera ? $0 : nil) } + if useCamera, Permission.Camera.status == .notDetermined { + return nil + } let controllers: [UIViewController] = tabsToShow.compactMap { tab in if tab == .imageTab {