فهرست منبع

tune down all-media tab

on android, it is is the overflow menu,
so we should also tune it down a bit on ios

- rightmost items are more out of scope in the tabbar
  as you have to stretch thumb

- use more boring icon
B. Petersen 2 سال پیش
والد
کامیت
0488e82e1d
2فایلهای تغییر یافته به همراه9 افزوده شده و 9 حذف شده
  1. 7 7
      deltachat-ios/Coordinator/AppCoordinator.swift
  2. 2 2
      deltachat-ios/Handler/AppStateRestorer.swift

+ 7 - 7
deltachat-ios/Coordinator/AppCoordinator.swift

@@ -8,8 +8,8 @@ class AppCoordinator {
 
     private let window: UIWindow
     private let dcAccounts: DcAccounts
-    private let qrTab = 0
-    public  let allMediaTab = 1 // there are two enums, here and at AppStateRestorer (this is error prone and could probably be merged)
+    public  let allMediaTab = 0 // the order below is important as well - and there are two enums, here and at AppStateRestorer (this is error prone and could probably be merged)
+    private let qrTab = 1
     public  let chatsTab = 2
     private let settingsTab = 3
 
@@ -29,7 +29,7 @@ class AppCoordinator {
         let settingsNavController = createSettingsNavigationController()
         let tabBarController = UITabBarController()
         tabBarController.delegate = appStateRestorer
-        tabBarController.viewControllers = [qrNavController, allMediaNavController, chatsNavController, settingsNavController]
+        tabBarController.viewControllers = [allMediaNavController, qrNavController, chatsNavController, settingsNavController]
         tabBarController.tabBar.tintColor = DcColors.primary
         return tabBarController
     }()
@@ -46,8 +46,8 @@ class AppCoordinator {
         let root = AllMediaViewController(dcAccounts: dcAccounts)
         let nav = UINavigationController(rootViewController: root)
         let settingsImage: UIImage?
-        if #available(iOS 16.0, *) {
-            settingsImage = UIImage(systemName: "photo.stack")
+        if #available(iOS 13.0, *) {
+            settingsImage = UIImage(systemName: "rectangle.on.rectangle")
         } else {
             settingsImage = UIImage(named: "report_card") // TODO: if image is settled, add it to assets
         }
@@ -261,8 +261,8 @@ class AppCoordinator {
             }
         }
 
-        self.tabBarController.setViewControllers([createQrNavigationController(),
-                                                  createAllMediaNavigationController(),
+        self.tabBarController.setViewControllers([createAllMediaNavigationController(),
+                                                  createQrNavigationController(),
                                                   createChatsNavigationController(),
                                                   createSettingsNavigationController()], animated: false)
         presentTabBarController()

+ 2 - 2
deltachat-ios/Handler/AppStateRestorer.swift

@@ -9,8 +9,8 @@ class AppStateRestorer: NSObject, UITabBarControllerDelegate {
     // UserDefaults returns 0 by default which conflicts with tab 0 -> therefore we map our tab indexes by adding an offsetKey
 
     private enum Tab: Int {
-        case qrTab = 10
-        case allMediaTab = 11 // there are two enums, here and at AppCoordinator (this is error prone and could probably be merged)
+        case allMediaTab = 10 // there are two enums, here and at AppCoordinator (this is error prone and could probably be merged)
+        case qrTab = 11
         case chatTab = 12
         case settingsTab = 13
         case firstLaunch = 0