Skip to content

Commit

Permalink
fix #942
Browse files Browse the repository at this point in the history
  • Loading branch information
longitachi committed Oct 21, 2024
1 parent 85a2718 commit 15009db
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Sources/Camera/ZLCustomCamera.swift
Original file line number Diff line number Diff line change
Expand Up @@ -662,14 +662,15 @@ open class ZLCustomCamera: UIViewController {
}

private func showAlertAndDismissAfterDoneAction(message: String, type: ZLNoAuthorityType?) {
if let type, let customAlertWhenNoAuthority = ZLPhotoConfiguration.default().customAlertWhenNoAuthority {
customAlertWhenNoAuthority(type)
return
}

let action = ZLCustomAlertAction(title: localLanguageTextValue(.done), style: .default) { [weak self] _ in
self?.dismiss(animated: true) {
if let type = type {
if let customAlertWhenNoAuthority = ZLPhotoConfiguration.default().customAlertWhenNoAuthority {
customAlertWhenNoAuthority(type)
} else {
ZLPhotoConfiguration.default().noAuthorityCallback?(type)
}
if let type {
ZLPhotoConfiguration.default().noAuthorityCallback?(type)
}
}
}
Expand Down

0 comments on commit 15009db

Please sign in to comment.