Browse Source

use order camera,gallery also for group-create, group-edit, self-profile (chat already uses this order)

B. Petersen 5 years ago
parent
commit
3825294320

+ 4 - 4
deltachat-ios/Controller/EditGroupViewController.swift

@@ -92,10 +92,10 @@ class EditGroupViewController: UITableViewController, MediaPickerDelegate {
 
 
     private func onAvatarTapped() {
     private func onAvatarTapped() {
         let alert = UIAlertController(title: nil, message: nil, preferredStyle: .safeActionSheet)
         let alert = UIAlertController(title: nil, message: nil, preferredStyle: .safeActionSheet)
-            let photoAction = PhotoPickerAlertAction(title: String.localized("gallery"), style: .default, handler: galleryButtonPressed(_:))
-            let videoAction = PhotoPickerAlertAction(title: String.localized("camera"), style: .default, handler: cameraButtonPressed(_:))
-            alert.addAction(photoAction)
-            alert.addAction(videoAction)
+            let cameraAction = PhotoPickerAlertAction(title: String.localized("camera"), style: .default, handler: cameraButtonPressed(_:))
+            let galleryAction = PhotoPickerAlertAction(title: String.localized("gallery"), style: .default, handler: galleryButtonPressed(_:))
+            alert.addAction(cameraAction)
+            alert.addAction(galleryAction)
             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)
     }
     }

+ 4 - 4
deltachat-ios/Controller/EditSettingsController.swift

@@ -139,12 +139,12 @@ class EditSettingsController: UITableViewController, MediaPickerDelegate {
 
 
     private func onAvatarTapped() {
     private func onAvatarTapped() {
         let alert = UIAlertController(title: String.localized("pref_profile_photo"), message: nil, preferredStyle: .safeActionSheet)
         let alert = UIAlertController(title: String.localized("pref_profile_photo"), message: nil, preferredStyle: .safeActionSheet)
-        let photoAction = PhotoPickerAlertAction(title: String.localized("gallery"), style: .default, handler: galleryButtonPressed(_:))
-        let videoAction = PhotoPickerAlertAction(title: String.localized("camera"), style: .default, handler: cameraButtonPressed(_:))
+        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: deleteProfileIconPressed(_:))
         let deleteAction = UIAlertAction(title: String.localized("delete"), style: .destructive, handler: deleteProfileIconPressed(_:))
 
 
-        alert.addAction(photoAction)
-        alert.addAction(videoAction)
+        alert.addAction(cameraAction)
+        alert.addAction(galleryAction)
         if dcContext.getSelfAvatarImage() != nil {
         if dcContext.getSelfAvatarImage() != nil {
             alert.addAction(deleteAction)
             alert.addAction(deleteAction)
         }
         }

+ 4 - 4
deltachat-ios/Controller/NewGroupController.swift

@@ -282,10 +282,10 @@ class NewGroupController: UITableViewController, MediaPickerDelegate {
 
 
     private func onAvatarTapped() {
     private func onAvatarTapped() {
         let alert = UIAlertController(title: nil, message: nil, preferredStyle: .safeActionSheet)
         let alert = UIAlertController(title: nil, message: nil, preferredStyle: .safeActionSheet)
-            let photoAction = PhotoPickerAlertAction(title: String.localized("gallery"), style: .default, handler: galleryButtonPressed(_:))
-            let videoAction = PhotoPickerAlertAction(title: String.localized("camera"), style: .default, handler: cameraButtonPressed(_:))
-            alert.addAction(photoAction)
-            alert.addAction(videoAction)
+            let cameraAction = PhotoPickerAlertAction(title: String.localized("camera"), style: .default, handler: cameraButtonPressed(_:))
+            let galleryAction = PhotoPickerAlertAction(title: String.localized("gallery"), style: .default, handler: galleryButtonPressed(_:))
+            alert.addAction(cameraAction)
+            alert.addAction(galleryAction)
             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)
     }
     }