mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Use navigation bar for image editor buttons.
This commit is contained in:
parent
e47ceab41c
commit
00aa5be55d
1 changed files with 12 additions and 4 deletions
|
@ -40,6 +40,7 @@ public class ImageEditorView: UIView {
|
|||
|
||||
updateButtons()
|
||||
updateGestureState()
|
||||
delegate?.imageEditorUpdateNavigationBar()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -264,10 +265,17 @@ public class ImageEditorView: UIView {
|
|||
let captionButton = navigationBarButton(imageName: "image_editor_caption",
|
||||
selector: #selector(didTapCaption(sender:)))
|
||||
|
||||
if model.canUndo() {
|
||||
return [undoButton, newTextButton, brushButton, cropButton, captionButton]
|
||||
} else {
|
||||
return [newTextButton, brushButton, cropButton, captionButton]
|
||||
switch editorMode {
|
||||
case .text:
|
||||
return []
|
||||
case .brush:
|
||||
return []
|
||||
case .none:
|
||||
if model.canUndo() {
|
||||
return [undoButton, newTextButton, brushButton, cropButton, captionButton]
|
||||
} else {
|
||||
return [newTextButton, brushButton, cropButton, captionButton]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue