Browse Source

normalize

marinofaggiana 4 years ago
parent
commit
330a28255e

+ 0 - 7
iOSClient/AppDelegate.swift

@@ -41,19 +41,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
     @objc var password: String = ""
     
     var activeAppConfigView: NCAppConfigView?
-    var activeFavorite: NCFavorite?
     var activeFiles: NCFiles?
     var activeFileViewInFolder: NCFileViewInFolder?
     var activeLogin: NCLogin?
     var activeLoginWeb: NCLoginWeb?
     @objc var activeMedia: NCMedia?
-    var activeMore: NCMore?
-    var activeOffline: NCOffline?
-    var activeRecent: NCRecent?
     var activeServerUrl: String = ""
-    var activeShares: NCShares?
-    var activeTransfers: NCTransfers?
-    var activeTrash: NCTrash?
     @objc var activeViewController: UIViewController?
     var activeViewerVideo: NCViewerVideo?
     

+ 0 - 1
iOSClient/Favorites/NCFavorite.swift

@@ -29,7 +29,6 @@ class NCFavorite: NCCollectionViewCommon  {
     required init?(coder aDecoder: NSCoder) {
         super.init(coder: aDecoder)
         
-        appDelegate.activeFavorite = self
         titleCurrentFolder = NSLocalizedString("_favorites_", comment: "")
         layoutKey = NCGlobal.shared.layoutViewFavorite
         enableSearchBar = true

+ 4 - 8
iOSClient/More/NCMore.swift

@@ -42,11 +42,7 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
 
     var tabAccount: tableAccount?
 
-    required init?(coder aDecoder: NSCoder) {
-        super.init(coder: aDecoder)
-
-        appDelegate.activeMore = self
-    }
+    // MARK: - Life Cycle
 
     override func viewDidLoad() {
         super.viewDidLoad()
@@ -190,14 +186,14 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
         }
     }
 
+    // MARK: - NotificationCenter
+
     @objc func changeTheming() {
         view.backgroundColor = NCBrandColor.shared.backgroundView
+        progressQuota.progressTintColor = NCBrandColor.shared.brandElement
         tableView.backgroundColor = NCBrandColor.shared.backgroundView
         tableView.separatorColor = NCBrandColor.shared.separator
         tableView.reloadData()
-        
-        viewQuota.backgroundColor = NCBrandColor.shared.backgroundView
-        progressQuota.progressTintColor = NCBrandColor.shared.brandElement
     }
 
     @objc func changeUserProfile() {

+ 0 - 1
iOSClient/Offline/NCOffline.swift

@@ -29,7 +29,6 @@ class NCOffline: NCCollectionViewCommon  {
     required init?(coder aDecoder: NSCoder) {
         super.init(coder: aDecoder)
         
-        appDelegate.activeOffline = self
         titleCurrentFolder = NSLocalizedString("_manage_file_offline_", comment: "")
         layoutKey = NCGlobal.shared.layoutViewOffline
         enableSearchBar = true

+ 0 - 1
iOSClient/Recent/NCRecent.swift

@@ -29,7 +29,6 @@ class NCRecent: NCCollectionViewCommon  {
     required init?(coder aDecoder: NSCoder) {
         super.init(coder: aDecoder)
         
-        appDelegate.activeRecent = self
         titleCurrentFolder = NSLocalizedString("_recent_", comment: "")
         layoutKey = NCGlobal.shared.layoutViewRecent
         enableSearchBar = false

+ 0 - 1
iOSClient/Shares/NCShares.swift

@@ -29,7 +29,6 @@ class NCShares: NCCollectionViewCommon  {
     required init?(coder aDecoder: NSCoder) {
         super.init(coder: aDecoder)
         
-        appDelegate.activeShares = self
         titleCurrentFolder = NSLocalizedString("_list_shares_", comment: "")
         layoutKey = NCGlobal.shared.layoutViewShares 
         enableSearchBar = false

+ 0 - 1
iOSClient/Transfers/NCTransfers.swift

@@ -31,7 +31,6 @@ class NCTransfers: NCCollectionViewCommon, NCTransferCellDelegate  {
     required init?(coder aDecoder: NSCoder) {
         super.init(coder: aDecoder)
         
-        appDelegate.activeTransfers = self
         titleCurrentFolder = NSLocalizedString("_transfers_", comment: "")
         layoutKey = NCGlobal.shared.layoutViewTransfers
         enableSearchBar = false

+ 0 - 6
iOSClient/Trash/NCTrash.swift

@@ -55,12 +55,6 @@ class NCTrash: UIViewController, UIGestureRecognizerDelegate, NCTrashListCellDel
     
     private let refreshControl = UIRefreshControl()
 
-    required init?(coder aDecoder: NSCoder) {
-        super.init(coder: aDecoder)
-        
-        appDelegate.activeTrash = self
-    }
-    
     override func viewDidLoad() {
         super.viewDidLoad()