diff options
author | marinofaggiana <marino@marinofaggiana.com> | 2020-10-01 19:26:57 +0300 |
---|---|---|
committer | marinofaggiana <marino@marinofaggiana.com> | 2020-10-01 19:26:57 +0300 |
commit | 69a40e72681e5e12e4af1f71b098e378cea74191 (patch) | |
tree | b7a7be1a2d9ca2db02bc7a3cfa9f6a617a75d090 /iOSClient | |
parent | d78dd9466ec5789fb89ff570d1359a2cd2472002 (diff) |
coding
Diffstat (limited to 'iOSClient')
-rw-r--r-- | iOSClient/FileViewInFolder/NCFileViewInFolder.swift | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/iOSClient/FileViewInFolder/NCFileViewInFolder.swift b/iOSClient/FileViewInFolder/NCFileViewInFolder.swift index 2e6e6fdef..cb977e465 100644 --- a/iOSClient/FileViewInFolder/NCFileViewInFolder.swift +++ b/iOSClient/FileViewInFolder/NCFileViewInFolder.swift @@ -95,11 +95,14 @@ class NCFileViewInFolder: NCCollectionViewCommon { if fileName != nil { if let metadata = NCManageDatabase.sharedInstance.getMetadata(predicate: NSPredicate(format: "account == %@ AND serverUrl == %@ AND fileName == %@", appDelegate.account, serverUrl, fileName!)) { if let row = dataSource.getIndexMetadata(ocId: metadata.ocId) { - DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { - self.collectionView.scrollToItem(at: IndexPath(row: row, section: 0), at: .centeredVertically, animated: true) - if let cell = self.collectionView.cellForItem(at: IndexPath(row: row, section: 0)) { - NCUtility.shared.blink(cell: cell) - self.fileName = nil + DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { + UIView.animate(withDuration: 0.3) { + self.collectionView.scrollToItem(at: IndexPath(row: row, section: 0), at: .centeredVertically, animated: false) + } completion: { (_) in + if let cell = self.collectionView.cellForItem(at: IndexPath(row: row, section: 0)) { + NCUtility.shared.blink(cell: cell) + self.fileName = nil + } } } } |