Browse Source

clear code

marinofaggiana 5 years ago
parent
commit
cf1ac4e85d
2 changed files with 5 additions and 6 deletions
  1. 0 1
      iOSClient/Login/CCLoginWeb.swift
  2. 5 5
      iOSClient/Media/NCMedia.swift

+ 0 - 1
iOSClient/Login/CCLoginWeb.swift

@@ -120,7 +120,6 @@ extension CCLoginWeb: SwiftModalWebVCDelegate {
                     
                     if (loginType == k_login_Add || loginType == k_login_Add_Forced) {
                         
-    
                         // NO account found, clear
                         if NCManageDatabase.sharedInstance.getAccounts() == nil {
                             NCUtility.sharedInstance.removeAllSettings()

+ 5 - 5
iOSClient/Media/NCMedia.swift

@@ -496,7 +496,7 @@ extension NCMedia {
 
     public func reloadDataSource(loadNetworkDatasource: Bool) {
         
-        if appDelegate.activeAccount.count == 0 {
+        if (appDelegate.activeAccount == nil || appDelegate.activeAccount.count == 0 || appDelegate.maintenanceMode == true) {
             return
         }
         
@@ -522,7 +522,7 @@ extension NCMedia {
     
     func deleteItems() {
         
-        if appDelegate.activeAccount.count == 0 {
+        if (appDelegate.activeAccount == nil || appDelegate.activeAccount.count == 0 || appDelegate.maintenanceMode == true) {
             return
         }
         
@@ -555,7 +555,7 @@ extension NCMedia {
 #endif
         // -----------------
         
-        if appDelegate.activeAccount.count == 0 {
+        if (appDelegate.activeAccount == nil || appDelegate.activeAccount.count == 0 || appDelegate.maintenanceMode == true) {
             return
         }
         
@@ -641,7 +641,7 @@ extension NCMedia {
         
         isDistantPast = false
         
-        if appDelegate.activeAccount.count == 0 {
+        if (appDelegate.activeAccount == nil || appDelegate.activeAccount.count == 0 || appDelegate.maintenanceMode == true) {
             return
         }
         
@@ -663,7 +663,7 @@ extension NCMedia {
     
     private func selectSearchSections() {
         
-        if appDelegate.activeAccount.count == 0 {
+        if (appDelegate.activeAccount == nil || appDelegate.activeAccount.count == 0 || appDelegate.maintenanceMode == true) {
             return
         }