Skip to content

Commit

Permalink
Make sure the permissions controller is displayed if the camera permi…
Browse files Browse the repository at this point in the history
…ssions are not determined. #141
  • Loading branch information
onato committed Feb 26, 2019
1 parent 11183c1 commit 338e88a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/Gallery/GalleryController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 338e88a

Please sign in to comment.