Fix inconsistent UI in the in-app camera.
Explicitly hide "Switch Camera" button if badged Done button is visible. Previously Done button would just obscure "Switch Camera" button. The following user actions would result in badged Done button visible with '0' as badge value: • open in-app camera, tap media library • select one or more items and close media library picker • tap media library again and unselect all previously selected items.
This commit is contained in:
parent
fd81c4ea0a
commit
8fe1b517ca
@ -453,12 +453,15 @@ class PhotoCaptureViewController: OWSViewController, InteractiveDismissDelegate
|
||||
}
|
||||
|
||||
func updateDoneButtonAppearance () {
|
||||
if isInBatchMode, let badgeNumber = dataSource?.numberOfMediaItems {
|
||||
if isInBatchMode, let badgeNumber = dataSource?.numberOfMediaItems, badgeNumber > 0 {
|
||||
doneButton.badgeNumber = badgeNumber
|
||||
doneButton.isHidden = false
|
||||
} else {
|
||||
doneButton.isHidden = true
|
||||
}
|
||||
if bottomBar.isCompactHeightLayout {
|
||||
bottomBar.switchCameraButton.isHidden = !doneButton.isHidden
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Interactive Dismiss
|
||||
|
||||
Loading…
Reference in New Issue
Block a user