Переглянути джерело

rename my profile into qr scan/show and replace all profile code references to qr

cyberta 5 роки тому
батько
коміт
318ab21521

+ 4 - 4
deltachat-ios.xcodeproj/project.pbxproj

@@ -7,7 +7,7 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
-		30149D9322F21129003C12B5 /* NewProfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30149D9222F21129003C12B5 /* NewProfileViewController.swift */; };
+		30149D9322F21129003C12B5 /* QrViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30149D9222F21129003C12B5 /* QrViewController.swift */; };
 		3022E6BE22E8768800763272 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3022E6C022E8768800763272 /* InfoPlist.strings */; };
 		3060119C22DDE24000C1CE6F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3060119E22DDE24000C1CE6F /* Localizable.strings */; };
 		306011B622E5E7FB00C1CE6F /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = 306011B422E5E7FB00C1CE6F /* Localizable.stringsdict */; };
@@ -85,7 +85,7 @@
 /* Begin PBXFileReference section */
 		21EE28844E7A690D73BF5285 /* Pods-deltachat-iosTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-deltachat-iosTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-deltachat-iosTests/Pods-deltachat-iosTests.debug.xcconfig"; sourceTree = "<group>"; };
 		2F7009234DB9408201A6CDCB /* Pods_deltachat_iosTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_deltachat_iosTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-		30149D9222F21129003C12B5 /* NewProfileViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewProfileViewController.swift; sourceTree = "<group>"; };
+		30149D9222F21129003C12B5 /* QrViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QrViewController.swift; sourceTree = "<group>"; };
 		3022E6BF22E8768800763272 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
 		3022E6C122E8768C00763272 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/InfoPlist.strings; sourceTree = "<group>"; };
 		3022E6C222E8768E00763272 /* sq */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sq; path = sq.lproj/InfoPlist.strings; sourceTree = "<group>"; };
@@ -358,7 +358,7 @@
 				7AE0A5481FC42F65005ECB4B /* NewChatViewController.swift */,
 				AE0D26FC1FB1FE88002FAFCE /* ChatListController.swift */,
 				78ED838E21D5927A00243125 /* ProfileViewController.swift */,
-				30149D9222F21129003C12B5 /* NewProfileViewController.swift */,
+				30149D9222F21129003C12B5 /* QrViewController.swift */,
 				78E45E3921D3CFBC00D4B15E /* SettingsController.swift */,
 				7070FB9A2101ECBB000DC258 /* GroupNameController.swift */,
 				AE851ACF227DF50900ED86F0 /* GroupChatDetailViewController.swift */,
@@ -732,7 +732,7 @@
 				78ED838321D5379000243125 /* TextFieldCell.swift in Sources */,
 				78E45E3C21D3D03700D4B15E /* TextFieldTableViewCell.swift in Sources */,
 				AE0D26FD1FB1FE88002FAFCE /* ChatListController.swift in Sources */,
-				30149D9322F21129003C12B5 /* NewProfileViewController.swift in Sources */,
+				30149D9322F21129003C12B5 /* QrViewController.swift in Sources */,
 				AEE56D80225504DB007DC082 /* Extensions.swift in Sources */,
 				7A0052C81FBE6CB40048C3BF /* NewContactController.swift in Sources */,
 				AEE56D762253431E007DC082 /* AccountSetupController.swift in Sources */,

+ 1 - 1
deltachat-ios/Controller/ProfileViewController.swift

@@ -2,7 +2,7 @@ import UIKit
 
 class ProfileViewController: UITableViewController {
     var dcContext: DcContext
-    weak var coordinator: ProfileCoordinator?
+    weak var coordinator: QRViewCoordinator?
 
     var contact: DcContact? {
         // This is nil if we do not have an account setup yet

+ 3 - 3
deltachat-ios/Controller/NewProfileViewController.swift → deltachat-ios/Controller/QrViewController.swift

@@ -1,12 +1,12 @@
 import Foundation
 import UIKit
 
-class NewProfileViewController: UITableViewController, QrCodeReaderDelegate {
+class QrViewController: UITableViewController, QrCodeReaderDelegate {
     private let rowContact = 0
     private let rowQRCode = 1
     private let rowScanQR = 2
 
-    weak var coordinator: ProfileCoordinator?
+    weak var coordinator: QRViewCoordinator?
     let qrCodeReaderController = QrCodeReaderController()
     var secureJoinObserver: Any?
     var dcContext: DcContext
@@ -29,7 +29,7 @@ class NewProfileViewController: UITableViewController, QrCodeReaderDelegate {
 
     override func viewDidLoad() {
         super.viewDidLoad()
-        title = String.localized("pref_profile_info_headline")
+        title = String.localized("qr_code_title")
         qrCodeReaderController.delegate = self
         tableView.separatorStyle = .none
     }

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

@@ -7,7 +7,7 @@ class AppCoordinator: NSObject, Coordinator {
     private let window: UIWindow
     private let dcContext: DcContext
     private let mailboxTab = 0
-    private let profileTab = 1
+    private let qrTab = 1
     private let chatsTab = 2
     private let settingsTab = 3
 
@@ -19,7 +19,7 @@ class AppCoordinator: NSObject, Coordinator {
 
     private lazy var tabBarController: UITabBarController = {
         let tabBarController = UITabBarController()
-        tabBarController.viewControllers = [mailboxController, profileController, chatListController, settingsController]
+        tabBarController.viewControllers = [mailboxController, qrController, chatListController, settingsController]
         // put viewControllers here
         tabBarController.delegate = self
         tabBarController.tabBar.tintColor = DcColors.primary
@@ -40,12 +40,12 @@ class AppCoordinator: NSObject, Coordinator {
         return nav
     }()
 
-    private lazy var profileController: UIViewController = {
-        let controller = NewProfileViewController(dcContext: dcContext)
+    private lazy var qrController: UIViewController = {
+        let controller = QrViewController(dcContext: dcContext)
         let nav = DcNavigationController(rootViewController: controller)
         let settingsImage = UIImage(named: "report_card")
-        nav.tabBarItem = UITabBarItem(title: String.localized("pref_profile_info_headline"), image: settingsImage, tag: profileTab)
-        let coordinator = ProfileCoordinator(navigationController: nav)
+        nav.tabBarItem = UITabBarItem(title: String.localized("qr_code_title"), image: settingsImage, tag: qrTab)
+        let coordinator = QRViewCoordinator(navigationController: nav)
         self.childCoordinators.append(coordinator)
         controller.coordinator = coordinator
         return nav
@@ -118,7 +118,7 @@ extension AppCoordinator: UITabBarControllerDelegate {
             switch tabBarController.selectedIndex {
             case chatsTab, settingsTab:
                 dcNav.navigationBar.prefersLargeTitles = true
-            case mailboxTab, profileTab:
+            case mailboxTab, qrTab:
                 dcNav.navigationBar.prefersLargeTitles = false
             default:
                 // should never get here
@@ -144,7 +144,7 @@ class MailboxCoordinator: ChatViewCoordinator {
     }
 }
 
-class ProfileCoordinator: Coordinator {
+class QRViewCoordinator: Coordinator {
     var navigationController: UINavigationController
     init(navigationController: UINavigationController) {
         self.navigationController = navigationController

+ 1 - 0
deltachat-ios/en.lproj/Localizable.strings

@@ -650,3 +650,4 @@
 "automatic" = "Automatic";
 "complete" = "Complete";
 "info" = "Info";
+"qr_code_title" = "QR scan/show";

+ 1 - 0
tools/untranslated.xml

@@ -22,6 +22,7 @@
     <string name="automatic">Automatic</string>
     <string name="complete">Complete</string>
     <string name="info">Info</string>
+    <string name="qr_code_title">QR scan/show</string>
     <!-- info plist keys need to pre prefixed with INFOPLIST., spaces need to be replaced with dots and dashes need to replaced with underscores -->
     <string name="INFOPLIST.Privacy._.Camera.Usage.Description">Allowing access to the camera lets you take photos and videos.</string>
     <string name="INFOPLIST.Privacy._.Contacts.Usage.Description">Allowing access to your address book lets you chat with contacts from your device.</string>