marinofaggiana 3 жил өмнө
parent
commit
9cafb6015a

+ 2 - 2
iOSClient/Data/NCManageDatabase.swift

@@ -178,7 +178,7 @@ class NCManageDatabase: NSObject {
     //MARK: -
     //MARK: Utility Database
 
-    @objc func clearTable(_ table : Object.Type, account: String?) {
+    @objc func clearTable(_ table : Object.Type, account: String? = nil) {
         
         let realm = try! Realm()
 
@@ -204,7 +204,7 @@ class NCManageDatabase: NSObject {
         self.clearTable(tableActivity.self, account: account)
         self.clearTable(tableActivityPreview.self, account: account)
         self.clearTable(tableActivitySubjectRich.self, account: account)
-        self.clearTable(tableAvatar.self, account: account)
+        self.clearTable(tableAvatar.self)
         self.clearTable(tableCapabilities.self, account: account)
         self.clearTable(tableChunk.self, account: account)
         self.clearTable(tableComments.self, account: account)

+ 5 - 0
iOSClient/Networking/NCOperationQueue.swift

@@ -496,6 +496,11 @@ class NCOperationDownloadAvatar: ConcurrentOperation {
                     #if !EXTENSION
                     (UIApplication.shared.delegate as! AppDelegate).avatars[self.user] = image
                     #endif
+                    if self.view is UICollectionView {
+                        (self.view as? UICollectionView)?.reloadData()
+                    } else if self.view is UITableView{
+                        (self.view as? UITableView)?.reloadData()
+                    }
                 }
                 
                 self.finish()