diff options
author | marinofaggiana <ios@nextcloud.com> | 2022-08-03 12:13:34 +0300 |
---|---|---|
committer | marinofaggiana <ios@nextcloud.com> | 2022-08-03 12:13:34 +0300 |
commit | 19d33193fd020aff778520515ec6a5a8f3432818 (patch) | |
tree | 2ece36863d515e02c0516b93d61bf67fa655e2e8 /iOSClient | |
parent | df74d8cec9d247f5ef02a97ae08353e9160c579c (diff) |
test
Signed-off-by: marinofaggiana <ios@nextcloud.com>
Diffstat (limited to 'iOSClient')
-rw-r--r-- | iOSClient/Files/NCFiles.swift | 16 | ||||
-rw-r--r-- | iOSClient/Main/NCFunctionCenter.swift | 2 |
2 files changed, 14 insertions, 4 deletions
diff --git a/iOSClient/Files/NCFiles.swift b/iOSClient/Files/NCFiles.swift index 40948b4de..790f37d18 100644 --- a/iOSClient/Files/NCFiles.swift +++ b/iOSClient/Files/NCFiles.swift @@ -54,6 +54,12 @@ class NCFiles: NCCollectionViewCommon { super.viewWillAppear(animated) } + override func viewWillDisappear(_ animated: Bool) { + super.viewWillDisappear(animated) + + fileNameBlink = nil + } + // MARK: - NotificationCenter override func initialize(_ notification: NSNotification) { @@ -112,8 +118,10 @@ class NCFiles: NCCollectionViewCommon { DispatchQueue.main.async { self.collectionView.reloadData() - self.blinkCell(fileName: self.fileNameBlink) - self.fileNameBlink = nil + if !self.dataSource.metadatas.isEmpty { + self.blinkCell(fileName: self.fileNameBlink) + self.fileNameBlink = nil + } } } } @@ -141,7 +149,9 @@ class NCFiles: NCCollectionViewCommon { if metadatasUpdate?.count ?? 0 > 0 || metadatasDelete?.count ?? 0 > 0 || forced { self.reloadDataSource(forced: false) } else if self.dataSource.getMetadataSourceForAllSections().isEmpty { - DispatchQueue.main.async { self.collectionView.reloadData() } + DispatchQueue.main.async { + self.collectionView.reloadData() + } } } } diff --git a/iOSClient/Main/NCFunctionCenter.swift b/iOSClient/Main/NCFunctionCenter.swift index 71fbccb5d..9c5551305 100644 --- a/iOSClient/Main/NCFunctionCenter.swift +++ b/iOSClient/Main/NCFunctionCenter.swift @@ -456,7 +456,7 @@ import Photos func openFileViewInFolder(serverUrl: String, fileNameBlink: String?) { - DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { + DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { var topNavigationController: UINavigationController? var pushServerUrl = NCUtilityFileSystem.shared.getHomeServer(account: self.appDelegate.account) var mostViewController = UIApplication.shared.keyWindow!.rootViewController!.topMostViewController() |