|
@@ -95,13 +95,10 @@ class EditGroupViewController: UITableViewController, MediaPickerDelegate {
|
|
|
|
|
|
private func onAvatarTapped() {
|
|
private func onAvatarTapped() {
|
|
let alert = UIAlertController(title: String.localized("group_avatar"), message: nil, preferredStyle: .safeActionSheet)
|
|
let alert = UIAlertController(title: String.localized("group_avatar"), message: nil, preferredStyle: .safeActionSheet)
|
|
- let cameraAction = PhotoPickerAlertAction(title: String.localized("camera"), style: .default, handler: cameraButtonPressed(_:))
|
|
|
|
- let galleryAction = PhotoPickerAlertAction(title: String.localized("gallery"), style: .default, handler: galleryButtonPressed(_:))
|
|
|
|
- let deleteAction = UIAlertAction(title: String.localized("delete"), style: .destructive, handler: deleteGroupAvatarPressed(_:))
|
|
|
|
- alert.addAction(cameraAction)
|
|
|
|
- alert.addAction(galleryAction)
|
|
|
|
|
|
+ alert.addAction(PhotoPickerAlertAction(title: String.localized("camera"), style: .default, handler: cameraButtonPressed(_:)))
|
|
|
|
+ alert.addAction(PhotoPickerAlertAction(title: String.localized("gallery"), style: .default, handler: galleryButtonPressed(_:)))
|
|
if avatarSelectionCell.isAvatarSet() {
|
|
if avatarSelectionCell.isAvatarSet() {
|
|
- alert.addAction(deleteAction)
|
|
|
|
|
|
+ alert.addAction(UIAlertAction(title: String.localized("delete"), style: .destructive, handler: deleteGroupAvatarPressed(_:)))
|
|
}
|
|
}
|
|
alert.addAction(UIAlertAction(title: String.localized("cancel"), style: .cancel, handler: nil))
|
|
alert.addAction(UIAlertAction(title: String.localized("cancel"), style: .cancel, handler: nil))
|
|
self.present(alert, animated: true, completion: nil)
|
|
self.present(alert, animated: true, completion: nil)
|