diff --git a/Brand/Database.swift b/Brand/Database.swift index ae439a5ec7..699a9a634e 100644 --- a/Brand/Database.swift +++ b/Brand/Database.swift @@ -26,4 +26,4 @@ import Foundation // Database Realm // let databaseName = "nextcloud.realm" -let databaseSchemaVersion: UInt64 = 365 +let databaseSchemaVersion: UInt64 = 366 diff --git a/Nextcloud.xcodeproj/project.pbxproj b/Nextcloud.xcodeproj/project.pbxproj index 489259c8f7..a45b68fa2a 100644 --- a/Nextcloud.xcodeproj/project.pbxproj +++ b/Nextcloud.xcodeproj/project.pbxproj @@ -5682,7 +5682,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 36; + CURRENT_PROJECT_VERSION = 4; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = NKUJUXUJ3B; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -5709,7 +5709,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 6.0.0; + MARKETING_VERSION = 6.1.0; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = "-v"; OTHER_LDFLAGS = ""; @@ -5748,7 +5748,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 36; + CURRENT_PROJECT_VERSION = 4; DEVELOPMENT_TEAM = NKUJUXUJ3B; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -5772,7 +5772,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 6.0.0; + MARKETING_VERSION = 6.1.0; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = "-v"; OTHER_LDFLAGS = ""; diff --git a/Share/NCShareExtension+Files.swift b/Share/NCShareExtension+Files.swift index 6c64a1a06e..b84189ce28 100644 --- a/Share/NCShareExtension+Files.swift +++ b/Share/NCShareExtension+Files.swift @@ -29,9 +29,9 @@ import NextcloudKit extension NCShareExtension { @objc func reloadDatasource(withLoadFolder: Bool) { let predicate = NSPredicate(format: "account == %@ AND serverUrl == %@ AND directory == true", session.account, serverUrl) - let results = self.database.getResultsMetadatasPredicate(predicate, layoutForView: NCDBLayoutForView()) + let metadatas = self.database.getResultsMetadatasPredicate(predicate, layoutForView: NCDBLayoutForView()) - self.dataSource = NCCollectionViewDataSource(results: results) + self.dataSource = NCCollectionViewDataSource(metadatas: metadatas) if withLoadFolder { loadFolder() diff --git a/iOSClient/Color/NCColorPicker.swift b/iOSClient/Color/NCColorPicker.swift index 8b6c85a7bb..ec8ad7b7f7 100644 --- a/iOSClient/Color/NCColorPicker.swift +++ b/iOSClient/Color/NCColorPicker.swift @@ -212,7 +212,7 @@ class NCColorPicker: UIViewController { func updateColor(hexColor: String?) { if let metadata = metadata { let serverUrl = metadata.serverUrl + "/" + metadata.fileName - NCManageDatabase.shared.setDirectory(serverUrl: serverUrl, colorFolder: hexColor, metadata: metadata) + NCManageDatabase.shared.updateDirectoryColorFolder(hexColor, metadata: metadata, serverUrl: serverUrl) self.dismiss(animated: true) NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterReloadDataSource, userInfo: ["serverUrl": metadata.serverUrl, "clearDataSource": true]) } diff --git a/iOSClient/Data/NCManageDatabase+Account.swift b/iOSClient/Data/NCManageDatabase+Account.swift index 4d599d6f75..1fed677983 100644 --- a/iOSClient/Data/NCManageDatabase+Account.swift +++ b/iOSClient/Data/NCManageDatabase+Account.swift @@ -39,6 +39,7 @@ class tableAccount: Object { @objc dynamic var autoUploadFull: Bool = false @objc dynamic var autoUploadImage: Bool = false @objc dynamic var autoUploadVideo: Bool = false + @objc dynamic var autoUploadFavoritesOnly: Bool = false @objc dynamic var autoUploadWWAnPhoto: Bool = false @objc dynamic var autoUploadWWAnVideo: Bool = false @objc dynamic var backend = "" diff --git a/iOSClient/Data/NCManageDatabase+Directory.swift b/iOSClient/Data/NCManageDatabase+Directory.swift index 448c9ba0ba..16bc14d751 100644 --- a/iOSClient/Data/NCManageDatabase+Directory.swift +++ b/iOSClient/Data/NCManageDatabase+Directory.swift @@ -76,16 +76,6 @@ extension NCManageDatabase { } } - func addDirectory(directory: tableDirectory, metadata: tableMetadata) { - directory.account = metadata.account - directory.e2eEncrypted = metadata.e2eEncrypted - directory.favorite = metadata.favorite - directory.fileId = metadata.fileId - directory.ocId = metadata.ocId - directory.permissions = metadata.permissions - directory.richWorkspace = metadata.richWorkspace - } - func deleteDirectoryAndSubDirectory(serverUrl: String, account: String) { #if !EXTENSION DispatchQueue.main.async { @@ -101,11 +91,15 @@ extension NCManageDatabase { do { let realm = try Realm() let results = realm.objects(tableDirectory.self).filter("account == %@ AND serverUrl BEGINSWITH %@", account, serverUrl) - for result in results { - self.deleteMetadata(predicate: NSPredicate(format: "account == %@ AND serverUrl == %@", result.account, result.serverUrl)) - self.deleteLocalFileOcId(result.ocId) - } try realm.write { + for result in results { + let metadatas = realm.objects(tableMetadata.self).filter("account == %@ AND serverUrl == %@", account, result.serverUrl) + for metadata in metadatas { + let localFile = realm.objects(tableLocalFile.self).filter("ocId == %@", metadata.ocId) + realm.delete(localFile) + } + realm.delete(metadatas) + } realm.delete(results) } } catch let error { @@ -216,9 +210,17 @@ extension NCManageDatabase { result.offline = offline } else { let directory = tableDirectory() + + directory.account = metadata.account directory.serverUrl = serverUrl directory.offline = offline - addDirectory(directory: directory, metadata: metadata) + directory.e2eEncrypted = metadata.e2eEncrypted + directory.favorite = metadata.favorite + directory.fileId = metadata.fileId + directory.ocId = metadata.ocId + directory.permissions = metadata.permissions + directory.richWorkspace = metadata.richWorkspace + realm.add(directory, update: .all) } } @@ -239,8 +241,7 @@ extension NCManageDatabase { } } - @discardableResult - func setDirectory(serverUrl: String, richWorkspace: String?, account: String) -> tableDirectory? { + func updateDirectoryRichWorkspace(_ richWorkspace: String?, account: String, serverUrl: String) { var result: tableDirectory? do { @@ -252,15 +253,9 @@ extension NCManageDatabase { } catch let error { NextcloudKit.shared.nkCommonInstance.writeLog("[ERROR] Could not write to database: \(error)") } - - if let result = result { - return tableDirectory.init(value: result) - } else { - return nil - } } - func setDirectory(serverUrl: String, colorFolder: String?, metadata: tableMetadata) { + func updateDirectoryColorFolder(_ colorFolder: String?, metadata: tableMetadata, serverUrl: String) { do { let realm = try Realm() try realm.write { @@ -268,9 +263,17 @@ extension NCManageDatabase { result.colorFolder = colorFolder } else { let directory = tableDirectory() + + directory.account = metadata.account directory.serverUrl = serverUrl directory.colorFolder = colorFolder - addDirectory(directory: directory, metadata: metadata) + directory.e2eEncrypted = metadata.e2eEncrypted + directory.favorite = metadata.favorite + directory.fileId = metadata.fileId + directory.ocId = metadata.ocId + directory.permissions = metadata.permissions + directory.richWorkspace = metadata.richWorkspace + realm.add(directory) } } diff --git a/iOSClient/Data/NCManageDatabase+Metadata.swift b/iOSClient/Data/NCManageDatabase+Metadata.swift index e450cd161f..c6beee66c1 100644 --- a/iOSClient/Data/NCManageDatabase+Metadata.swift +++ b/iOSClient/Data/NCManageDatabase+Metadata.swift @@ -564,18 +564,33 @@ extension NCManageDatabase { // MARK: - Set - @discardableResult - func addMetadata(_ metadata: tableMetadata) -> tableMetadata? { + func createMetadata(_ metadata: tableMetadata) -> tableMetadata? { do { let realm = try Realm() + var managedMetadata: tableMetadata? try realm.write { - realm.add(tableMetadata(value: metadata), update: .all) + managedMetadata = realm.create(tableMetadata.self, value: metadata, update: .all) + } + if let managedMetadata { + return tableMetadata(value: managedMetadata) + } + } catch let error { + NextcloudKit.shared.nkCommonInstance.writeLog("[ERROR] Could not write to database: \(error)") + } + + return nil + } + + func addMetadata(_ metadata: tableMetadata) { + let metadata = tableMetadata(value: metadata) + do { + let realm = try Realm() + try realm.write { + realm.add(metadata, update: .all) } } catch let error { NextcloudKit.shared.nkCommonInstance.writeLog("[ERROR] Could not write to database: \(error)") - return nil } - return tableMetadata(value: metadata) } func addMetadatas(_ metadatas: [tableMetadata]) { @@ -1046,22 +1061,45 @@ extension NCManageDatabase { // MARK: - GetResult(s)Metadata - func getResultsMetadatasPredicate(_ predicate: NSPredicate, layoutForView: NCDBLayoutForView?) -> Results? { + func getResultsMetadatasPredicate(_ predicate: NSPredicate, layoutForView: NCDBLayoutForView?) -> [tableMetadata] { do { let realm = try Realm() - var results = realm.objects(tableMetadata.self).filter(predicate) + var results = realm.objects(tableMetadata.self).filter(predicate).freeze() if let layoutForView { - if layoutForView.directoryOnTop { - results = results.sorted(byKeyPath: layoutForView.sort, ascending: layoutForView.ascending).sorted(byKeyPath: "directory", ascending: false).sorted(byKeyPath: "favorite", ascending: false) + if layoutForView.sort == "fileName" { + let sortedResults = results.sorted { + // 1. favorite order + if $0.favorite == $1.favorite { + // 2. directory order TOP + if layoutForView.directoryOnTop { + if $0.directory == $1.directory { + // 3. natural fileName + return $0.fileNameView.localizedStandardCompare($1.fileNameView) == .orderedAscending + } else { + return $0.directory && !$1.directory + } + } else { + return $0.fileNameView.localizedStandardCompare($1.fileNameView) == .orderedAscending + } + } else { + return $0.favorite && !$1.favorite + } + } + return sortedResults } else { - results = results.sorted(byKeyPath: layoutForView.sort, ascending: layoutForView.ascending).sorted(byKeyPath: "favorite", ascending: false) + if layoutForView.directoryOnTop { + results = results.sorted(byKeyPath: layoutForView.sort, ascending: layoutForView.ascending).sorted(byKeyPath: "directory", ascending: false).sorted(byKeyPath: "favorite", ascending: false) + } else { + results = results.sorted(byKeyPath: layoutForView.sort, ascending: layoutForView.ascending).sorted(byKeyPath: "favorite", ascending: false) + } } } - return results + return Array(results) + } catch let error as NSError { NextcloudKit.shared.nkCommonInstance.writeLog("[ERROR] Could not access database: \(error)") } - return nil + return [] } func getResultsMetadatas(predicate: NSPredicate, sortedByKeyPath: String, ascending: Bool, arraySlice: Int) -> [tableMetadata] { diff --git a/iOSClient/Favorites/NCFavorite.swift b/iOSClient/Favorites/NCFavorite.swift index 9386d0ec33..5ecea0a716 100644 --- a/iOSClient/Favorites/NCFavorite.swift +++ b/iOSClient/Favorites/NCFavorite.swift @@ -59,11 +59,12 @@ class NCFavorite: NCCollectionViewCommon { var predicate = self.defaultPredicate if self.serverUrl.isEmpty { - predicate = NSPredicate(format: "account == %@ AND favorite == true", session.account) + predicate = NSPredicate(format: "account == %@ AND favorite == true AND NOT (status IN %@)", session.account, global.metadataStatusHideInView) } - let results = self.database.getResultsMetadatasPredicate(predicate, layoutForView: layoutForView) - self.dataSource = NCCollectionViewDataSource(results: results, layoutForView: layoutForView) + let metadatas = self.database.getResultsMetadatasPredicate(predicate, layoutForView: layoutForView) + + self.dataSource = NCCollectionViewDataSource(metadatas: metadatas, layoutForView: layoutForView) super.reloadDataSource() } diff --git a/iOSClient/Files/NCFiles.swift b/iOSClient/Files/NCFiles.swift index 18b9fb83fd..66443a5785 100644 --- a/iOSClient/Files/NCFiles.swift +++ b/iOSClient/Files/NCFiles.swift @@ -131,13 +131,13 @@ class NCFiles: NCCollectionViewCommon { self.metadataFolder = database.getMetadataFolder(session: session, serverUrl: self.serverUrl) self.richWorkspaceText = database.getTableDirectory(predicate: predicateDirectory)?.richWorkspace - let results = self.database.getResultsMetadatasPredicate(predicate, layoutForView: layoutForView) - self.dataSource = NCCollectionViewDataSource(results: results, layoutForView: layoutForView) + let metadatas = self.database.getResultsMetadatasPredicate(predicate, layoutForView: layoutForView) - guard let results else { + self.dataSource = NCCollectionViewDataSource(metadatas: metadatas, layoutForView: layoutForView) + + if metadatas.isEmpty { return super.reloadDataSource() } - let metadatas = Array(results.freeze()) self.dataSource.caching(metadatas: metadatas, dataSourceMetadatas: dataSourceMetadatas) { updated in if updated || self.isNumberOfItemsInAllSectionsNull || self.numberOfItemsInAllSections != metadatas.count { @@ -201,7 +201,8 @@ class NCFiles: NCCollectionViewCommon { return completion(nil, false, error) } /// Check change eTag or E2EE or DataSource empty - let tableDirectory = self.database.setDirectory(serverUrl: self.serverUrl, richWorkspace: metadata.richWorkspace, account: account) + self.database.updateDirectoryRichWorkspace(metadata.richWorkspace, account: account, serverUrl: self.serverUrl) + let tableDirectory = self.database.getTableDirectory(ocId: metadata.ocId) guard tableDirectory?.etag != metadata.etag || metadata.e2eEncrypted || self.dataSource.isEmpty() else { return completion(nil, false, NKError()) } diff --git a/iOSClient/Groupfolders/NCGroupfolders.swift b/iOSClient/Groupfolders/NCGroupfolders.swift index 44ca7f8f29..37e157e48e 100644 --- a/iOSClient/Groupfolders/NCGroupfolders.swift +++ b/iOSClient/Groupfolders/NCGroupfolders.swift @@ -56,15 +56,17 @@ class NCGroupfolders: NCCollectionViewCommon { // MARK: - DataSource override func reloadDataSource() { - var results: Results? + var metadatas: [tableMetadata] = [] if self.serverUrl.isEmpty { - results = database.getResultsMetadatasFromGroupfolders(session: session) + if let results = database.getResultsMetadatasFromGroupfolders(session: session) { + metadatas = Array(results.freeze()) + } } else { - results = self.database.getResultsMetadatasPredicate(self.defaultPredicate, layoutForView: layoutForView) + metadatas = self.database.getResultsMetadatasPredicate(self.defaultPredicate, layoutForView: layoutForView) } - self.dataSource = NCCollectionViewDataSource(results: results, layoutForView: layoutForView) + self.dataSource = NCCollectionViewDataSource(metadatas: metadatas, layoutForView: layoutForView) super.reloadDataSource() } diff --git a/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift b/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift index 02c0fb3ca9..a366556fe5 100644 --- a/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift +++ b/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift @@ -1073,7 +1073,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS } providers: { _, searchProviders in self.providers = searchProviders self.searchResults = [] - self.dataSource = NCCollectionViewDataSource(results: nil, layoutForView: self.layoutForView, providers: self.providers, searchResults: self.searchResults) + self.dataSource = NCCollectionViewDataSource(metadatas: [], layoutForView: self.layoutForView, providers: self.providers, searchResults: self.searchResults) } update: { _, _, searchResult, metadatas in guard let metadatas, !metadatas.isEmpty, self.isSearchingMode, let searchResult else { return } NCNetworking.shared.unifiedSearchQueue.addOperation(NCCollectionViewUnifiedSearch(collectionViewCommon: self, metadatas: metadatas, searchResult: searchResult)) @@ -1085,16 +1085,17 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS NCNetworking.shared.searchFiles(literal: literalSearch, account: session.account) { task in self.dataSourceTask = task self.reloadDataSource() - } completion: { metadatas, error in + } completion: { metadatasSearch, error in DispatchQueue.main.async { self.refreshControl.endRefreshing() self.reloadDataSource() } - guard let metadatas, error == .success, self.isSearchingMode else { return } - let ocId = metadatas.map { $0.ocId } - let results = self.database.getResultsMetadatasPredicate(NSPredicate(format: "ocId IN %@", ocId), layoutForView: self.layoutForView) + guard let metadatasSearch, error == .success, self.isSearchingMode else { return } + let ocId = metadatasSearch.map { $0.ocId } - self.dataSource = NCCollectionViewDataSource(results: results, layoutForView: self.layoutForView, providers: self.providers, searchResults: self.searchResults) + let metadatas = self.database.getResultsMetadatasPredicate(NSPredicate(format: "ocId IN %@", ocId), layoutForView: self.layoutForView) + + self.dataSource = NCCollectionViewDataSource(metadatas: metadatas, layoutForView: self.layoutForView, providers: self.providers, searchResults: self.searchResults) } } } diff --git a/iOSClient/Main/Collection Common/NCCollectionViewDataSource.swift b/iOSClient/Main/Collection Common/NCCollectionViewDataSource.swift index fc17fc68df..edad2e0eda 100644 --- a/iOSClient/Main/Collection Common/NCCollectionViewDataSource.swift +++ b/iOSClient/Main/Collection Common/NCCollectionViewDataSource.swift @@ -32,7 +32,6 @@ class NCCollectionViewDataSource: NSObject { private var sectionsValue: [String] = [] private var providers: [NKSearchProvider]? private var searchResults: [NKSearchResult]? - private var results: Results? private var metadatas: [tableMetadata] = [] private var metadatasForSection: [NCMetadataForSection] = [] private var layoutForView: NCDBLayoutForView? @@ -40,20 +39,14 @@ class NCCollectionViewDataSource: NSObject { override init() { super.init() } - init(results: Results?, + init(metadatas: [tableMetadata], layoutForView: NCDBLayoutForView? = nil, providers: [NKSearchProvider]? = nil, searchResults: [NKSearchResult]? = nil) { super.init() removeAll() - self.results = results - if let results { - self.metadatas = Array(results.freeze()) - } else { - self.metadatas = [] - } - + self.metadatas = metadatas self.layoutForView = layoutForView /// unified search self.providers = providers @@ -69,7 +62,6 @@ class NCCollectionViewDataSource: NSObject { func removeAll() { self.metadatas.removeAll() self.metadataIndexPath.removeAll() - self.results = nil self.metadatasForSection.removeAll() self.sectionsValue.removeAll() diff --git a/iOSClient/Menu/NCCollectionViewCommon+Menu.swift b/iOSClient/Menu/NCCollectionViewCommon+Menu.swift index 1374e5a7e7..cae10770e5 100644 --- a/iOSClient/Menu/NCCollectionViewCommon+Menu.swift +++ b/iOSClient/Menu/NCCollectionViewCommon+Menu.swift @@ -36,6 +36,8 @@ extension NCCollectionViewCommon { let sceneIdentifier = self.controller?.sceneIdentifier else { return } + let tableLocalFile = database.getResultsTableLocalFile(predicate: NSPredicate(format: "ocId == %@", metadata.ocId))?.first + let fileExists = NCUtilityFileSystem().fileProviderStorageExists(metadata) var actions = [NCMenuAction]() let serverUrl = metadata.serverUrl + "/" + metadata.fileName var isOffline: Bool = false @@ -230,8 +232,7 @@ extension NCCollectionViewCommon { // // SHARE // - if NCNetworking.shared.isOnline, - metadata.canShare { + if (NCNetworking.shared.isOnline || (tableLocalFile != nil && fileExists)) && metadata.canShare { actions.append(.share(selectedMetadatas: [metadata], controller: self.controller, order: 80)) } diff --git a/iOSClient/NCGlobal.swift b/iOSClient/NCGlobal.swift index 295ffb83ec..67e1a3474e 100644 --- a/iOSClient/NCGlobal.swift +++ b/iOSClient/NCGlobal.swift @@ -337,6 +337,9 @@ class NCGlobal: NSObject { let notificationCenterEnableSwipeGesture = "enableSwipeGesture" let notificationCenterDisableSwipeGesture = "disableSwipeGesture" + let notificationCenterPlayerIsPlaying = "playerIsPlaying" + let notificationCenterPlayerStoppedPlaying = "playerStoppedPlaying" + // TIP // let tipNCViewerPDFThumbnail = "tipncviewerpdfthumbnail" diff --git a/iOSClient/Networking/E2EE/NCEndToEndMetadataV20.swift b/iOSClient/Networking/E2EE/NCEndToEndMetadataV20.swift index 703368092d..296ca93fff 100644 --- a/iOSClient/Networking/E2EE/NCEndToEndMetadataV20.swift +++ b/iOSClient/Networking/E2EE/NCEndToEndMetadataV20.swift @@ -291,6 +291,13 @@ extension NCEndToEndMetadata { // SIGNATURE CHECK // + if let signature { + if !verifySignature(account: session.account, signature: signature, userId: tableUser.userId, metadata: metadata, users: users, version: version, certificate: tableUser.certificate) { + return NKError(errorCode: NCGlobal.shared.errorE2EEKeyVerifySignature, errorDescription: "_e2e_error_") + } + } + + /* if let signature, !signature.isEmpty { if !verifySignature(account: session.account, signature: signature, userId: tableUser.userId, metadata: metadata, users: users, version: version, certificate: tableUser.certificate) { return NKError(errorCode: NCGlobal.shared.errorE2EEKeyVerifySignature, errorDescription: "_e2e_error_") @@ -298,6 +305,7 @@ extension NCEndToEndMetadata { } else { return NKError(errorCode: NCGlobal.shared.errorE2EEKeyVerifySignature, errorDescription: "_e2e_error_") } + */ // FILEDROP // diff --git a/iOSClient/Networking/E2EE/NCNetworkingE2EEMarkFolder.swift b/iOSClient/Networking/E2EE/NCNetworkingE2EEMarkFolder.swift index ec1eb94b1e..26c3920cb5 100644 --- a/iOSClient/Networking/E2EE/NCNetworkingE2EEMarkFolder.swift +++ b/iOSClient/Networking/E2EE/NCNetworkingE2EEMarkFolder.swift @@ -37,7 +37,7 @@ class NCNetworkingE2EEMarkFolder: NSObject { guard resultsMarkE2EEFolder.error == .success else { return resultsMarkE2EEFolder.error } file.e2eEncrypted = true - guard let metadata = self.database.addMetadata(self.database.convertFileToMetadata(file, isDirectoryE2EE: false)) else { + guard let metadata = self.database.createMetadata(self.database.convertFileToMetadata(file, isDirectoryE2EE: false)) else { return NKError(errorCode: NCGlobal.shared.errorUnexpectedResponseFromDB, errorDescription: "_e2e_error_") } self.database.addDirectory(e2eEncrypted: true, favorite: metadata.favorite, ocId: metadata.ocId, fileId: metadata.fileId, permissions: metadata.permissions, serverUrl: serverUrlFileName, account: metadata.account) diff --git a/iOSClient/Networking/E2EE/NCNetworkingE2EEUpload.swift b/iOSClient/Networking/E2EE/NCNetworkingE2EEUpload.swift index 134f7c8b36..72adf1d144 100644 --- a/iOSClient/Networking/E2EE/NCNetworkingE2EEUpload.swift +++ b/iOSClient/Networking/E2EE/NCNetworkingE2EEUpload.swift @@ -54,7 +54,7 @@ class NCNetworkingE2EEUpload: NSObject { } metadata.session = NCNetworking.shared.sessionUpload metadata.sessionError = "" - guard let result = self.database.addMetadata(metadata), + guard let result = self.database.createMetadata(metadata), let directory = self.database.getTableDirectory(predicate: NSPredicate(format: "account == %@ AND serverUrl == %@", metadata.account, metadata.serverUrl)) else { return NKError(errorCode: NCGlobal.shared.errorUnexpectedResponseFromDB, errorDescription: NSLocalizedString("_e2e_error_", comment: "")) } @@ -121,17 +121,16 @@ class NCNetworkingE2EEUpload: NSObject { let resultsLock = await networkingE2EE.lock(account: metadata.account, serverUrl: metadata.serverUrl) guard let e2eToken = resultsLock.e2eToken, let fileId = resultsLock.fileId, resultsLock.error == .success else { self.database.deleteMetadata(predicate: NSPredicate(format: "ocIdTransfer == %@", metadata.ocIdTransfer)) - NotificationCenter.default.postOnMainThread( - name: NCGlobal.shared.notificationCenterUploadedFile, - object: nil, - userInfo: ["ocId": metadata.ocId, - "ocIdTransfer": metadata.ocIdTransfer, - "session": metadata.session, - "serverUrl": metadata.serverUrl, - "account": metadata.account, - "fileName": metadata.fileName, - "error": NKError(errorCode: NCGlobal.shared.errorE2EELock, errorDescription: NSLocalizedString("_e2e_error_", comment: ""))], - second: 0.5) + NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterUploadedFile, + object: nil, + userInfo: ["ocId": metadata.ocId, + "ocIdTransfer": metadata.ocIdTransfer, + "session": metadata.session, + "serverUrl": metadata.serverUrl, + "account": metadata.account, + "fileName": metadata.fileName, + "error": NKError(errorCode: NCGlobal.shared.errorE2EELock, errorDescription: NSLocalizedString("_e2e_error_", comment: ""))], + second: 0.5) return NKError(errorCode: NCGlobal.shared.errorE2EELock, errorDescription: NSLocalizedString("_e2e_error_", comment: "")) } diff --git a/iOSClient/Networking/NCAutoUpload.swift b/iOSClient/Networking/NCAutoUpload.swift index bf56c2dcb0..f49d2ba26d 100644 --- a/iOSClient/Networking/NCAutoUpload.swift +++ b/iOSClient/Networking/NCAutoUpload.swift @@ -246,12 +246,16 @@ class NCAutoUpload: NSObject { } let idAsset = account + asset.localIdentifier + creationDateString if !idAssets.contains(idAsset) { - newAssets.append(asset) + if (asset.isFavorite && tableAccount.autoUploadFavoritesOnly) || !tableAccount.autoUploadFavoritesOnly { + newAssets.append(asset) + } } } } else { assets.enumerateObjects { asset, _, _ in - newAssets.append(asset) + if (asset.isFavorite && tableAccount.autoUploadFavoritesOnly) || !tableAccount.autoUploadFavoritesOnly { + newAssets.append(asset) + } } } completion(newAssets) diff --git a/iOSClient/Networking/NCNetworkingProcess.swift b/iOSClient/Networking/NCNetworkingProcess.swift index 7aefe4da44..b9c5a149bd 100644 --- a/iOSClient/Networking/NCNetworkingProcess.swift +++ b/iOSClient/Networking/NCNetworkingProcess.swift @@ -37,10 +37,21 @@ class NCNetworkingProcess { private var hasRun: Bool = false private let lockQueue = DispatchQueue(label: "com.nextcloud.networkingprocess.lockqueue") private var timerProcess: Timer? + private var enableControllingScreenAwake = true private init() { self.startTimer() self.startObserveTableMetadata() + + NotificationCenter.default.addObserver(forName: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterPlayerIsPlaying), object: nil, queue: nil) { _ in + + self.enableControllingScreenAwake = false + } + + NotificationCenter.default.addObserver(forName: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterPlayerStoppedPlaying), object: nil, queue: nil) { _ in + + self.enableControllingScreenAwake = true + } } private func startObserveTableMetadata() { @@ -88,19 +99,19 @@ class NCNetworkingProcess { /// Keep screen awake /// - /* Task { let tasks = await self.networking.getAllDataTask() let hasSynchronizationTask = tasks.contains { $0.taskDescription == NCGlobal.shared.taskDescriptionSynchronization } let resultsTransfer = results.filter { self.global.metadataStatusInTransfer.contains($0.status) } + if !self.enableControllingScreenAwake { return } + if resultsTransfer.isEmpty && !hasSynchronizationTask { ScreenAwakeManager.shared.mode = .off } else { ScreenAwakeManager.shared.mode = NCKeychain().screenAwakeMode } } - */ if results.isEmpty { @@ -297,15 +308,38 @@ class NCNetworkingProcess { private func metadataStatusWaitWebDav() async -> Bool { var returnValue: Bool = false + /// ------------------------ CREATE FOLDER + /// + if let metadatasWaitCreateFolder = self.database.getMetadatas(predicate: NSPredicate(format: "status == %d", global.metadataStatusWaitCreateFolder), sortedByKeyPath: "serverUrl", ascending: true), !metadatasWaitCreateFolder.isEmpty { + for metadata in metadatasWaitCreateFolder { + let error = await networking.createFolder(metadata: metadata) + + if error != .success { + if metadata.sessionError.isEmpty { + let serverUrlFileName = metadata.serverUrl + "/" + metadata.fileName + let message = String(format: NSLocalizedString("_create_folder_error_", comment: ""), serverUrlFileName) + NCContentPresenter().messageNotification(message, error: error, delay: NCGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error, priority: .max) + } + returnValue = true + } + } + } + /// ------------------------ COPY /// if let metadatasWaitCopy = self.database.getMetadatas(predicate: NSPredicate(format: "status == %d", global.metadataStatusWaitCopy), sortedByKeyPath: "serverUrl", ascending: true), !metadatasWaitCopy.isEmpty { for metadata in metadatasWaitCopy { let serverUrlTo = metadata.serverUrlTo let serverUrlFileNameSource = metadata.serverUrl + "/" + metadata.fileName - let serverUrlFileNameDestination = serverUrlTo + "/" + metadata.fileName + var serverUrlFileNameDestination = serverUrlTo + "/" + metadata.fileName let overwrite = (metadata.storeFlag as? NSString)?.boolValue ?? false + /// Within same folder + if metadata.serverUrl == serverUrlTo { + let fileNameCopy = await NCNetworking.shared.createFileName(fileNameBase: metadata.fileName, account: metadata.account, serverUrl: metadata.serverUrl) + serverUrlFileNameDestination = serverUrlTo + "/" + fileNameCopy + } + let result = await networking.copyFileOrFolder(serverUrlFileNameSource: serverUrlFileNameSource, serverUrlFileNameDestination: serverUrlFileNameDestination, overwrite: overwrite, account: metadata.account) database.setMetadataCopyMove(ocId: metadata.ocId, serverUrlTo: "", overwrite: nil, status: global.metadataStatusNormal) @@ -415,23 +449,6 @@ class NCNetworkingProcess { } } - /// ------------------------ CREATE FOLDER - /// - if let metadatasWaitCreateFolder = self.database.getMetadatas(predicate: NSPredicate(format: "status == %d", global.metadataStatusWaitCreateFolder), sortedByKeyPath: "serverUrl", ascending: true), !metadatasWaitCreateFolder.isEmpty { - for metadata in metadatasWaitCreateFolder { - let error = await networking.createFolder(metadata: metadata) - - if error != .success { - if metadata.sessionError.isEmpty { - let serverUrlFileName = metadata.serverUrl + "/" + metadata.fileName - let message = String(format: NSLocalizedString("_create_folder_error_", comment: ""), serverUrlFileName) - NCContentPresenter().messageNotification(message, error: error, delay: NCGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error, priority: .max) - } - returnValue = true - } - } - } - return returnValue } diff --git a/iOSClient/Networking/NCService.swift b/iOSClient/Networking/NCService.swift index 286c37ae34..e6ba678492 100644 --- a/iOSClient/Networking/NCService.swift +++ b/iOSClient/Networking/NCService.swift @@ -32,11 +32,7 @@ class NCService: NSObject { // MARK: - public func startRequestServicesServer(account: String, controller: NCMainTabBarController?) { - guard !account.isEmpty, - UIApplication.shared.applicationState != .background else { - NextcloudKit.shared.nkCommonInstance.writeLog("[INFO] Service not start request service server with the application in background") - return - } + guard !account.isEmpty, UIApplication.shared.applicationState == .active else { return } Task(priority: .background) { self.database.clearAllAvatarLoaded() diff --git a/iOSClient/Offline/NCOffline.swift b/iOSClient/Offline/NCOffline.swift index 98b7d4f60f..328984af6a 100644 --- a/iOSClient/Offline/NCOffline.swift +++ b/iOSClient/Offline/NCOffline.swift @@ -53,7 +53,7 @@ class NCOffline: NCCollectionViewCommon { override func reloadDataSource() { var ocIds: [String] = [] - var results: Results? + var metadatas: [tableMetadata] = [] if self.serverUrl.isEmpty { if let directories = self.database.getTablesDirectory(predicate: NSPredicate(format: "account == %@ AND offline == true", session.account), sorted: "serverUrl", ascending: true) { @@ -65,12 +65,14 @@ class NCOffline: NCCollectionViewCommon { for file in files { ocIds.append(file.ocId) } - results = self.database.getResultsMetadatas(predicate: NSPredicate(format: "account == %@ AND ocId IN %@", session.account, ocIds)) + if let results = self.database.getResultsMetadatas(predicate: NSPredicate(format: "account == %@ AND ocId IN %@ AND NOT (status IN %@)", session.account, ocIds, global.metadataStatusHideInView)) { + metadatas = Array(results.freeze()) + } } else { - results = self.database.getResultsMetadatasPredicate(self.defaultPredicate, layoutForView: layoutForView) + metadatas = self.database.getResultsMetadatasPredicate(self.defaultPredicate, layoutForView: layoutForView) } - self.dataSource = NCCollectionViewDataSource(results: results, layoutForView: layoutForView) + self.dataSource = NCCollectionViewDataSource(metadatas: metadatas, layoutForView: layoutForView) super.reloadDataSource() } diff --git a/iOSClient/Recent/NCRecent.swift b/iOSClient/Recent/NCRecent.swift index d4ec2b5978..9ebfb9f7f1 100644 --- a/iOSClient/Recent/NCRecent.swift +++ b/iOSClient/Recent/NCRecent.swift @@ -55,13 +55,17 @@ class NCRecent: NCCollectionViewCommon { // MARK: - DataSource override func reloadDataSource() { - let results = self.database.getResultsMetadatas(predicate: NSPredicate(format: "account == %@ AND fileName != '.'", session.account), sortedByKeyPath: "date", ascending: false) + var metadatas: [tableMetadata] = [] + + if let results = self.database.getResultsMetadatas(predicate: NSPredicate(format: "account == %@ AND fileName != '.'", session.account), sortedByKeyPath: "date", ascending: false) { + metadatas = Array(results.freeze()) + } layoutForView?.sort = "date" layoutForView?.ascending = false layoutForView?.directoryOnTop = false - self.dataSource = NCCollectionViewDataSource(results: results, layoutForView: layoutForView) + self.dataSource = NCCollectionViewDataSource(metadatas: metadatas, layoutForView: layoutForView) super.reloadDataSource() } diff --git a/iOSClient/RichWorkspace/NCViewerRichWorkspace.swift b/iOSClient/RichWorkspace/NCViewerRichWorkspace.swift index dc3a51986d..d48f2293c6 100644 --- a/iOSClient/RichWorkspace/NCViewerRichWorkspace.swift +++ b/iOSClient/RichWorkspace/NCViewerRichWorkspace.swift @@ -68,7 +68,7 @@ import MarkdownKit NCNetworking.shared.readFile(serverUrlFileName: self.serverUrl, account: session.account, queue: .main) { _ in } completion: { account, metadata, error in if error == .success, let metadata { - NCManageDatabase.shared.setDirectory(serverUrl: self.serverUrl, richWorkspace: metadata.richWorkspace, account: account) + NCManageDatabase.shared.updateDirectoryRichWorkspace(metadata.richWorkspace, account: account, serverUrl: self.serverUrl) if self.richWorkspaceText != metadata.richWorkspace, metadata.richWorkspace != nil { self.delegate?.richWorkspaceText = self.richWorkspaceText self.richWorkspaceText = metadata.richWorkspace! diff --git a/iOSClient/SceneDelegate.swift b/iOSClient/SceneDelegate.swift index f9098438c7..58e0b4ca00 100644 --- a/iOSClient/SceneDelegate.swift +++ b/iOSClient/SceneDelegate.swift @@ -120,12 +120,14 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { hidePrivacyProtectionWindow() - NCService().startRequestServicesServer(account: session.account, controller: controller) - NCAutoUpload.shared.initAutoUpload(controller: nil, account: session.account) { num in NextcloudKit.shared.nkCommonInstance.writeLog("[INFO] Initialize Auto upload with \(num) uploads") } + DispatchQueue.main.asyncAfter(deadline: .now() + 1) { + NCService().startRequestServicesServer(account: session.account, controller: controller) + } + DispatchQueue.main.asyncAfter(deadline: .now() + 2) { Task { await NCNetworking.shared.verifyZombie() diff --git a/iOSClient/Select/NCSelect.swift b/iOSClient/Select/NCSelect.swift index 2f521340b3..abde11d752 100644 --- a/iOSClient/Select/NCSelect.swift +++ b/iOSClient/Select/NCSelect.swift @@ -181,11 +181,14 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent guard let userInfo = notification.userInfo as NSDictionary?, let ocId = userInfo["ocId"] as? String, let serverUrl = userInfo["serverUrl"] as? String, + let withPush = userInfo["withPush"] as? Bool, serverUrl == self.serverUrl, let metadata = self.database.getMetadataFromOcId(ocId) else { return } - pushMetadata(metadata) + if withPush { + pushMetadata(metadata) + } } // MARK: ACTION @@ -466,9 +469,9 @@ extension NCSelect { if includeDirectoryE2EEncryption { if includeImages { - predicate = NSPredicate(format: "account == %@ AND serverUrl == %@ AND (directory == true OR classFile == 'image')", session.account, serverUrl) + predicate = NSPredicate(format: "account == %@ AND serverUrl == %@ AND (directory == true OR classFile == 'image') AND NOT (status IN %@)", session.account, serverUrl, NCGlobal.shared.metadataStatusHideInView) } else { - predicate = NSPredicate(format: "account == %@ AND serverUrl == %@ AND directory == true", session.account, serverUrl) + predicate = NSPredicate(format: "account == %@ AND serverUrl == %@ AND directory == true AND NOT (status IN %@)", session.account, serverUrl, NCGlobal.shared.metadataStatusHideInView) } } else { if includeImages { @@ -476,7 +479,7 @@ extension NCSelect { } else if enableSelectFile { predicate = NSPredicate(format: "account == %@ AND serverUrl == %@ AND e2eEncrypted == false AND NOT (status IN %@)", session.account, serverUrl, NCGlobal.shared.metadataStatusHideInView) } else { - predicate = NSPredicate(format: "account == %@ AND serverUrl == %@ AND e2eEncrypted == false AND directory == true", session.account, serverUrl) + predicate = NSPredicate(format: "account == %@ AND serverUrl == %@ AND e2eEncrypted == false AND directory == true AND NOT (status IN %@)", session.account, serverUrl, NCGlobal.shared.metadataStatusHideInView) } } @@ -489,9 +492,9 @@ extension NCSelect { self.collectionView.reloadData() } } completion: { _, _, _, _, _ in - let results = self.database.getResultsMetadatasPredicate(predicate, layoutForView: NCDBLayoutForView()) + let metadatas = self.database.getResultsMetadatasPredicate(predicate, layoutForView: NCDBLayoutForView()) - self.dataSource = NCCollectionViewDataSource(results: results) + self.dataSource = NCCollectionViewDataSource(metadatas: metadatas) self.collectionView.reloadData() NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterReloadDataSource, userInfo: ["serverUrl": self.serverUrl]) diff --git a/iOSClient/Settings/AutoUpload/NCAutoUploadModel.swift b/iOSClient/Settings/AutoUpload/NCAutoUploadModel.swift index dbb5fc4090..cafc33c728 100644 --- a/iOSClient/Settings/AutoUpload/NCAutoUploadModel.swift +++ b/iOSClient/Settings/AutoUpload/NCAutoUploadModel.swift @@ -41,6 +41,8 @@ class NCAutoUploadModel: ObservableObject, ViewOnAppearHandling { @Published var autoUploadVideo: Bool = false /// A state variable that indicates whether auto upload for videos is enabled or not @Published var autoUploadWWAnVideo: Bool = false + /// A state variable that indicates whether only assets marked as favorites should be uploaded + @Published var autoUploadFavoritesOnly: Bool = false /// A state variable that indicates whether auto upload for full resolution photos is enabled or not @Published var autoUploadFull: Bool = false /// A state variable that indicates whether auto upload creates subfolders based on date or not @@ -78,6 +80,7 @@ class NCAutoUploadModel: ObservableObject, ViewOnAppearHandling { autoUploadWWAnPhoto = tableAccount.autoUploadWWAnPhoto autoUploadVideo = tableAccount.autoUploadVideo autoUploadWWAnVideo = tableAccount.autoUploadWWAnVideo + autoUploadFavoritesOnly = tableAccount.autoUploadFavoritesOnly autoUploadFull = tableAccount.autoUploadFull autoUploadCreateSubfolder = tableAccount.autoUploadCreateSubfolder autoUploadSubfolderGranularity = Granularity(rawValue: tableAccount.autoUploadSubfolderGranularity) ?? .monthly @@ -152,6 +155,14 @@ class NCAutoUploadModel: ObservableObject, ViewOnAppearHandling { updateAccountProperty(\.autoUploadWWAnVideo, value: newValue) } + /// Updates the auto-upload favorite only. + func handleAutoUploadFavoritesOnlyChange(newValue: Bool) { + updateAccountProperty(\.autoUploadFavoritesOnly, value: newValue) + if newValue { + NCAutoUpload.shared.alignPhotoLibrary(controller: controller, account: session.account) + } + } + /// Updates the auto-upload full content setting. func handleAutoUploadFullChange(newValue: Bool) { updateAccountProperty(\.autoUploadFull, value: newValue) diff --git a/iOSClient/Settings/AutoUpload/NCAutoUploadView.swift b/iOSClient/Settings/AutoUpload/NCAutoUploadView.swift index 58b22a0913..642a515d70 100644 --- a/iOSClient/Settings/AutoUpload/NCAutoUploadView.swift +++ b/iOSClient/Settings/AutoUpload/NCAutoUploadView.swift @@ -113,6 +113,15 @@ struct NCAutoUploadView: View { } .font(.system(size: 16)) }) + /// Only upload favorites if desired + Section(content: { + Toggle(NSLocalizedString("_autoupload_favorites_", comment: ""), isOn: $model.autoUploadFavoritesOnly) + .tint(Color(NCBrandColor.shared.getElement(account: model.session.account))) + .onChange(of: model.autoUploadFavoritesOnly) { newValue in + model.handleAutoUploadFavoritesOnlyChange(newValue: newValue) + } + .font(.system(size: 16)) + }) /// Auto Upload create subfolder Section(content: { Toggle(NSLocalizedString("_autoupload_create_subfolder_", comment: ""), isOn: $model.autoUploadCreateSubfolder) diff --git a/iOSClient/Settings/Display/NCDisplayView.swift b/iOSClient/Settings/Display/NCDisplayView.swift index 19b0574e90..d045d99d67 100644 --- a/iOSClient/Settings/Display/NCDisplayView.swift +++ b/iOSClient/Settings/Display/NCDisplayView.swift @@ -67,7 +67,6 @@ struct NCDisplayView: View { } .font(.system(size: 16)) - /* Section(header: Text(NSLocalizedString("_additional_options_", comment: ""))) { Picker(NSLocalizedString("_keep_screen_awake_", comment: ""), @@ -79,7 +78,6 @@ struct NCDisplayView: View { .frame(height: 50) } .pickerStyle(.menu) - */ } .navigationBarTitle(NSLocalizedString("_display_", comment: "")) .defaultViewModifier(model) diff --git a/iOSClient/Shares/NCShares.swift b/iOSClient/Shares/NCShares.swift index 0997e3b353..80be9fb8a1 100644 --- a/iOSClient/Shares/NCShares.swift +++ b/iOSClient/Shares/NCShares.swift @@ -81,9 +81,9 @@ class NCShares: NCCollectionViewCommon { } } - let results = self.database.getResultsMetadatasPredicate(NSPredicate(format: "ocId IN %@", ocId), layoutForView: layoutForView) + let metadatas = self.database.getResultsMetadatasPredicate(NSPredicate(format: "ocId IN %@", ocId), layoutForView: layoutForView) - self.dataSource = NCCollectionViewDataSource(results: results, layoutForView: layoutForView) + self.dataSource = NCCollectionViewDataSource(metadatas: metadatas, layoutForView: layoutForView) super.reloadDataSource() } diff --git a/iOSClient/Supporting Files/af.lproj/Localizable.strings b/iOSClient/Supporting Files/af.lproj/Localizable.strings index 15575872ad..147b45a457 100644 Binary files a/iOSClient/Supporting Files/af.lproj/Localizable.strings and b/iOSClient/Supporting Files/af.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/an.lproj/Localizable.strings b/iOSClient/Supporting Files/an.lproj/Localizable.strings index e07b48798d..a2332e26f3 100644 Binary files a/iOSClient/Supporting Files/an.lproj/Localizable.strings and b/iOSClient/Supporting Files/an.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ar.lproj/InfoPlist.strings b/iOSClient/Supporting Files/ar.lproj/InfoPlist.strings index 9b8ddebd75..5847014aaf 100644 Binary files a/iOSClient/Supporting Files/ar.lproj/InfoPlist.strings and b/iOSClient/Supporting Files/ar.lproj/InfoPlist.strings differ diff --git a/iOSClient/Supporting Files/ar.lproj/Localizable.strings b/iOSClient/Supporting Files/ar.lproj/Localizable.strings index f3232fc190..18398544dd 100644 Binary files a/iOSClient/Supporting Files/ar.lproj/Localizable.strings and b/iOSClient/Supporting Files/ar.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ast.lproj/Localizable.strings b/iOSClient/Supporting Files/ast.lproj/Localizable.strings index e5563c229e..1e70f63612 100644 Binary files a/iOSClient/Supporting Files/ast.lproj/Localizable.strings and b/iOSClient/Supporting Files/ast.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/az.lproj/Localizable.strings b/iOSClient/Supporting Files/az.lproj/Localizable.strings index d36bacc922..48d8e55938 100644 Binary files a/iOSClient/Supporting Files/az.lproj/Localizable.strings and b/iOSClient/Supporting Files/az.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/be.lproj/Localizable.strings b/iOSClient/Supporting Files/be.lproj/Localizable.strings index 14eefaff9a..2239e6a719 100644 Binary files a/iOSClient/Supporting Files/be.lproj/Localizable.strings and b/iOSClient/Supporting Files/be.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/bg_BG.lproj/Localizable.strings b/iOSClient/Supporting Files/bg_BG.lproj/Localizable.strings index 0497ee85ff..926d182ada 100644 Binary files a/iOSClient/Supporting Files/bg_BG.lproj/Localizable.strings and b/iOSClient/Supporting Files/bg_BG.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/bn_BD.lproj/Localizable.strings b/iOSClient/Supporting Files/bn_BD.lproj/Localizable.strings index e680766df4..ea4f86d284 100644 Binary files a/iOSClient/Supporting Files/bn_BD.lproj/Localizable.strings and b/iOSClient/Supporting Files/bn_BD.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/br.lproj/Localizable.strings b/iOSClient/Supporting Files/br.lproj/Localizable.strings index dae0b80bb8..e6b3ee1520 100644 Binary files a/iOSClient/Supporting Files/br.lproj/Localizable.strings and b/iOSClient/Supporting Files/br.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/bs.lproj/Localizable.strings b/iOSClient/Supporting Files/bs.lproj/Localizable.strings index 0ba14caf39..2514445d4c 100644 Binary files a/iOSClient/Supporting Files/bs.lproj/Localizable.strings and b/iOSClient/Supporting Files/bs.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ca.lproj/Localizable.strings b/iOSClient/Supporting Files/ca.lproj/Localizable.strings index 9b2e64f86c..d65366793b 100644 Binary files a/iOSClient/Supporting Files/ca.lproj/Localizable.strings and b/iOSClient/Supporting Files/ca.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/cs-CZ.lproj/Localizable.strings b/iOSClient/Supporting Files/cs-CZ.lproj/Localizable.strings index 1b4492539e..507a106340 100644 Binary files a/iOSClient/Supporting Files/cs-CZ.lproj/Localizable.strings and b/iOSClient/Supporting Files/cs-CZ.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/cy_GB.lproj/Localizable.strings b/iOSClient/Supporting Files/cy_GB.lproj/Localizable.strings index 8883b95eb1..8ba84887d8 100644 Binary files a/iOSClient/Supporting Files/cy_GB.lproj/Localizable.strings and b/iOSClient/Supporting Files/cy_GB.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/da.lproj/Localizable.strings b/iOSClient/Supporting Files/da.lproj/Localizable.strings index b4e633799a..4bc841d4b8 100644 Binary files a/iOSClient/Supporting Files/da.lproj/Localizable.strings and b/iOSClient/Supporting Files/da.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/de.lproj/Localizable.strings b/iOSClient/Supporting Files/de.lproj/Localizable.strings index 489d84a7c1..681188dc8d 100644 Binary files a/iOSClient/Supporting Files/de.lproj/Localizable.strings and b/iOSClient/Supporting Files/de.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/el.lproj/Localizable.strings b/iOSClient/Supporting Files/el.lproj/Localizable.strings index b0b7e8b002..1375b5917d 100644 Binary files a/iOSClient/Supporting Files/el.lproj/Localizable.strings and b/iOSClient/Supporting Files/el.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/en-GB.lproj/Localizable.strings b/iOSClient/Supporting Files/en-GB.lproj/Localizable.strings index 53a2e57d7c..0ae7ecd682 100644 Binary files a/iOSClient/Supporting Files/en-GB.lproj/Localizable.strings and b/iOSClient/Supporting Files/en-GB.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/en.lproj/Localizable.strings b/iOSClient/Supporting Files/en.lproj/Localizable.strings index fe9ee97227..3a2a9014e7 100644 --- a/iOSClient/Supporting Files/en.lproj/Localizable.strings +++ b/iOSClient/Supporting Files/en.lproj/Localizable.strings @@ -392,6 +392,7 @@ "_autoupload_background_" = "Auto upload in the background"; "_autoupload_photos_" = "Auto upload photos"; "_autoupload_videos_" = "Auto upload videos"; +"_autoupload_favorites_" = "Auto upload favorites only"; "_autoupload_description_" = "New photos/videos will be automatically uploaded to your server."; "_autoupload_description_background_" = "This option requires the use of GPS to trigger the detection of new photos/videos in the camera roll once the location changes significantly"; "_autoupload_background_title_" = "Limitations"; @@ -1007,7 +1008,7 @@ "_additional_view_options_" = "Additional view options"; "_while_charging_" = "While charging"; "_additional_options_" = "Additional options"; -"_keep_screen_awake_" = "Keep screen awake while transferring files"; +"_keep_screen_awake_" = "Keep screen awake\nwhile transferring files"; "_error_not_found_" = "The requested resource could not be found"; "_error_conflict_" = "The request could not be completed due to a conflict with the current state of the resource"; "_error_precondition_" = "The server does not meet one of the preconditions that the requester"; diff --git a/iOSClient/Supporting Files/eo.lproj/Localizable.strings b/iOSClient/Supporting Files/eo.lproj/Localizable.strings index 06c2737f01..9377dfcd5a 100644 Binary files a/iOSClient/Supporting Files/eo.lproj/Localizable.strings and b/iOSClient/Supporting Files/eo.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-419.lproj/Localizable.strings b/iOSClient/Supporting Files/es-419.lproj/Localizable.strings index e409c634a5..a6af023e8e 100644 Binary files a/iOSClient/Supporting Files/es-419.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-419.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-AR.lproj/Localizable.strings b/iOSClient/Supporting Files/es-AR.lproj/Localizable.strings index aae4fbe9ff..578ec094a9 100644 Binary files a/iOSClient/Supporting Files/es-AR.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-AR.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-CL.lproj/Localizable.strings b/iOSClient/Supporting Files/es-CL.lproj/Localizable.strings index ad78c74276..a2da31f1ee 100644 Binary files a/iOSClient/Supporting Files/es-CL.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-CL.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-CO.lproj/Localizable.strings b/iOSClient/Supporting Files/es-CO.lproj/Localizable.strings index a8af52eb5a..bd510611db 100644 Binary files a/iOSClient/Supporting Files/es-CO.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-CO.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-CR.lproj/Localizable.strings b/iOSClient/Supporting Files/es-CR.lproj/Localizable.strings index bb92bb56b9..fb08b39936 100644 Binary files a/iOSClient/Supporting Files/es-CR.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-CR.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-DO.lproj/Localizable.strings b/iOSClient/Supporting Files/es-DO.lproj/Localizable.strings index 6588b0402a..30a67790a9 100644 Binary files a/iOSClient/Supporting Files/es-DO.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-DO.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-EC.lproj/Localizable.strings b/iOSClient/Supporting Files/es-EC.lproj/Localizable.strings index f81b17c767..178405e621 100644 Binary files a/iOSClient/Supporting Files/es-EC.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-EC.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-GT.lproj/Localizable.strings b/iOSClient/Supporting Files/es-GT.lproj/Localizable.strings index 667f6598b2..1d2aa1bf23 100644 Binary files a/iOSClient/Supporting Files/es-GT.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-GT.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-HN.lproj/Localizable.strings b/iOSClient/Supporting Files/es-HN.lproj/Localizable.strings index 9f986af5fd..a36a234d36 100644 Binary files a/iOSClient/Supporting Files/es-HN.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-HN.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-MX.lproj/Localizable.strings b/iOSClient/Supporting Files/es-MX.lproj/Localizable.strings index efe7d0930b..a7558c4641 100644 Binary files a/iOSClient/Supporting Files/es-MX.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-MX.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-NI.lproj/Localizable.strings b/iOSClient/Supporting Files/es-NI.lproj/Localizable.strings index 34206c870d..147bcb0e5d 100644 Binary files a/iOSClient/Supporting Files/es-NI.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-NI.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-PA.lproj/Localizable.strings b/iOSClient/Supporting Files/es-PA.lproj/Localizable.strings index aefd28c6db..4afdca086e 100644 Binary files a/iOSClient/Supporting Files/es-PA.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-PA.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-PE.lproj/Localizable.strings b/iOSClient/Supporting Files/es-PE.lproj/Localizable.strings index 91a96aef54..bca66c5962 100644 Binary files a/iOSClient/Supporting Files/es-PE.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-PE.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-PR.lproj/Localizable.strings b/iOSClient/Supporting Files/es-PR.lproj/Localizable.strings index 8287da2f58..6fc6b9173d 100644 Binary files a/iOSClient/Supporting Files/es-PR.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-PR.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-PY.lproj/Localizable.strings b/iOSClient/Supporting Files/es-PY.lproj/Localizable.strings index fb77f53082..a6a333bfba 100644 Binary files a/iOSClient/Supporting Files/es-PY.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-PY.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-SV.lproj/Localizable.strings b/iOSClient/Supporting Files/es-SV.lproj/Localizable.strings index f61fd121b3..1355244a55 100644 Binary files a/iOSClient/Supporting Files/es-SV.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-SV.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es-UY.lproj/Localizable.strings b/iOSClient/Supporting Files/es-UY.lproj/Localizable.strings index aa4ac2dafa..01d363cb81 100644 Binary files a/iOSClient/Supporting Files/es-UY.lproj/Localizable.strings and b/iOSClient/Supporting Files/es-UY.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/es.lproj/Localizable.strings b/iOSClient/Supporting Files/es.lproj/Localizable.strings index 99d54df1eb..31eef28fbd 100644 Binary files a/iOSClient/Supporting Files/es.lproj/Localizable.strings and b/iOSClient/Supporting Files/es.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/et_EE.lproj/Localizable.strings b/iOSClient/Supporting Files/et_EE.lproj/Localizable.strings index 4c5c0c2c62..39a7efeffd 100644 Binary files a/iOSClient/Supporting Files/et_EE.lproj/Localizable.strings and b/iOSClient/Supporting Files/et_EE.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/eu.lproj/Localizable.strings b/iOSClient/Supporting Files/eu.lproj/Localizable.strings index f7b7872103..3b7d6f81a0 100644 Binary files a/iOSClient/Supporting Files/eu.lproj/Localizable.strings and b/iOSClient/Supporting Files/eu.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/fa.lproj/Localizable.strings b/iOSClient/Supporting Files/fa.lproj/Localizable.strings index ec83359d32..6b9aae2b08 100644 Binary files a/iOSClient/Supporting Files/fa.lproj/Localizable.strings and b/iOSClient/Supporting Files/fa.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/fi-FI.lproj/Localizable.strings b/iOSClient/Supporting Files/fi-FI.lproj/Localizable.strings index 3ac178a1df..fd5d3499af 100644 Binary files a/iOSClient/Supporting Files/fi-FI.lproj/Localizable.strings and b/iOSClient/Supporting Files/fi-FI.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/fo.lproj/Localizable.strings b/iOSClient/Supporting Files/fo.lproj/Localizable.strings index d8286f9f40..72413d0ba7 100644 Binary files a/iOSClient/Supporting Files/fo.lproj/Localizable.strings and b/iOSClient/Supporting Files/fo.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/fr.lproj/Localizable.strings b/iOSClient/Supporting Files/fr.lproj/Localizable.strings index 00a9faebef..48d31147e3 100644 Binary files a/iOSClient/Supporting Files/fr.lproj/Localizable.strings and b/iOSClient/Supporting Files/fr.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ga.lproj/Localizable.strings b/iOSClient/Supporting Files/ga.lproj/Localizable.strings index 6f52451469..8d203be744 100644 Binary files a/iOSClient/Supporting Files/ga.lproj/Localizable.strings and b/iOSClient/Supporting Files/ga.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/gd.lproj/Localizable.strings b/iOSClient/Supporting Files/gd.lproj/Localizable.strings index e99ef6c922..fdeb6d11a5 100644 Binary files a/iOSClient/Supporting Files/gd.lproj/Localizable.strings and b/iOSClient/Supporting Files/gd.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/gl.lproj/Localizable.strings b/iOSClient/Supporting Files/gl.lproj/Localizable.strings index aa2b3b65cb..628590b139 100644 Binary files a/iOSClient/Supporting Files/gl.lproj/Localizable.strings and b/iOSClient/Supporting Files/gl.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/he.lproj/Localizable.strings b/iOSClient/Supporting Files/he.lproj/Localizable.strings index 42835ab0d7..cdd3168a1c 100644 Binary files a/iOSClient/Supporting Files/he.lproj/Localizable.strings and b/iOSClient/Supporting Files/he.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/hi_IN.lproj/Localizable.strings b/iOSClient/Supporting Files/hi_IN.lproj/Localizable.strings index 9977ce2b14..ac4dbaf021 100644 Binary files a/iOSClient/Supporting Files/hi_IN.lproj/Localizable.strings and b/iOSClient/Supporting Files/hi_IN.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/hr.lproj/Localizable.strings b/iOSClient/Supporting Files/hr.lproj/Localizable.strings index 6e87aa7f7d..f66c339b7a 100644 Binary files a/iOSClient/Supporting Files/hr.lproj/Localizable.strings and b/iOSClient/Supporting Files/hr.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/hsb.lproj/Localizable.strings b/iOSClient/Supporting Files/hsb.lproj/Localizable.strings index a89752178f..44f1ae7083 100644 Binary files a/iOSClient/Supporting Files/hsb.lproj/Localizable.strings and b/iOSClient/Supporting Files/hsb.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/hu.lproj/Localizable.strings b/iOSClient/Supporting Files/hu.lproj/Localizable.strings index b8cc6fcec1..d6c07ab8f2 100644 Binary files a/iOSClient/Supporting Files/hu.lproj/Localizable.strings and b/iOSClient/Supporting Files/hu.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/hy.lproj/Localizable.strings b/iOSClient/Supporting Files/hy.lproj/Localizable.strings index c15ad49984..b2811b1bee 100644 Binary files a/iOSClient/Supporting Files/hy.lproj/Localizable.strings and b/iOSClient/Supporting Files/hy.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ia.lproj/Localizable.strings b/iOSClient/Supporting Files/ia.lproj/Localizable.strings index 19c6a14185..a734f9217a 100644 Binary files a/iOSClient/Supporting Files/ia.lproj/Localizable.strings and b/iOSClient/Supporting Files/ia.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/id.lproj/Localizable.strings b/iOSClient/Supporting Files/id.lproj/Localizable.strings index 3152a10095..b390f881e8 100644 Binary files a/iOSClient/Supporting Files/id.lproj/Localizable.strings and b/iOSClient/Supporting Files/id.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ig.lproj/Localizable.strings b/iOSClient/Supporting Files/ig.lproj/Localizable.strings index 3c5dacf2a9..fc6a18670a 100644 Binary files a/iOSClient/Supporting Files/ig.lproj/Localizable.strings and b/iOSClient/Supporting Files/ig.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/is.lproj/Localizable.strings b/iOSClient/Supporting Files/is.lproj/Localizable.strings index f97c6a6c1a..0a6ed8079f 100644 Binary files a/iOSClient/Supporting Files/is.lproj/Localizable.strings and b/iOSClient/Supporting Files/is.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/it.lproj/Localizable.strings b/iOSClient/Supporting Files/it.lproj/Localizable.strings index cf8aac8f37..dece9ed041 100644 Binary files a/iOSClient/Supporting Files/it.lproj/Localizable.strings and b/iOSClient/Supporting Files/it.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ja-JP.lproj/Localizable.strings b/iOSClient/Supporting Files/ja-JP.lproj/Localizable.strings index cb2184036d..ae9814e375 100644 Binary files a/iOSClient/Supporting Files/ja-JP.lproj/Localizable.strings and b/iOSClient/Supporting Files/ja-JP.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ka-GE.lproj/Localizable.strings b/iOSClient/Supporting Files/ka-GE.lproj/Localizable.strings index 5b747a88d3..0314075cab 100644 Binary files a/iOSClient/Supporting Files/ka-GE.lproj/Localizable.strings and b/iOSClient/Supporting Files/ka-GE.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ka.lproj/Localizable.strings b/iOSClient/Supporting Files/ka.lproj/Localizable.strings index e4c7cddc85..fabc368b7c 100644 Binary files a/iOSClient/Supporting Files/ka.lproj/Localizable.strings and b/iOSClient/Supporting Files/ka.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/kab.lproj/Localizable.strings b/iOSClient/Supporting Files/kab.lproj/Localizable.strings index b1858ba5f2..83eea6b796 100644 Binary files a/iOSClient/Supporting Files/kab.lproj/Localizable.strings and b/iOSClient/Supporting Files/kab.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/km.lproj/Localizable.strings b/iOSClient/Supporting Files/km.lproj/Localizable.strings index 1e526d8d91..a39006ba8a 100644 Binary files a/iOSClient/Supporting Files/km.lproj/Localizable.strings and b/iOSClient/Supporting Files/km.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/kn.lproj/Localizable.strings b/iOSClient/Supporting Files/kn.lproj/Localizable.strings index 95c1539881..2512a21a3e 100644 Binary files a/iOSClient/Supporting Files/kn.lproj/Localizable.strings and b/iOSClient/Supporting Files/kn.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ko.lproj/Localizable.strings b/iOSClient/Supporting Files/ko.lproj/Localizable.strings index 27180f90bc..c29ff67c8c 100644 Binary files a/iOSClient/Supporting Files/ko.lproj/Localizable.strings and b/iOSClient/Supporting Files/ko.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/la.lproj/Localizable.strings b/iOSClient/Supporting Files/la.lproj/Localizable.strings index e13af8be42..e4b1b24a00 100644 Binary files a/iOSClient/Supporting Files/la.lproj/Localizable.strings and b/iOSClient/Supporting Files/la.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/lb.lproj/Localizable.strings b/iOSClient/Supporting Files/lb.lproj/Localizable.strings index 0fd771d40b..d4d01da2b6 100644 Binary files a/iOSClient/Supporting Files/lb.lproj/Localizable.strings and b/iOSClient/Supporting Files/lb.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/lo.lproj/Localizable.strings b/iOSClient/Supporting Files/lo.lproj/Localizable.strings index 9c6ca8378e..de1a756dae 100644 Binary files a/iOSClient/Supporting Files/lo.lproj/Localizable.strings and b/iOSClient/Supporting Files/lo.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/lt_LT.lproj/Localizable.strings b/iOSClient/Supporting Files/lt_LT.lproj/Localizable.strings index 68e6101c56..e7b8af2b03 100644 Binary files a/iOSClient/Supporting Files/lt_LT.lproj/Localizable.strings and b/iOSClient/Supporting Files/lt_LT.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/lv.lproj/Localizable.strings b/iOSClient/Supporting Files/lv.lproj/Localizable.strings index 36b21857c5..10d4322a8c 100644 Binary files a/iOSClient/Supporting Files/lv.lproj/Localizable.strings and b/iOSClient/Supporting Files/lv.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/mk.lproj/Localizable.strings b/iOSClient/Supporting Files/mk.lproj/Localizable.strings index f3c530bdc9..544ef95735 100644 Binary files a/iOSClient/Supporting Files/mk.lproj/Localizable.strings and b/iOSClient/Supporting Files/mk.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/mn.lproj/Localizable.strings b/iOSClient/Supporting Files/mn.lproj/Localizable.strings index 02abe1f507..a1b1c4114c 100644 Binary files a/iOSClient/Supporting Files/mn.lproj/Localizable.strings and b/iOSClient/Supporting Files/mn.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/mr.lproj/Localizable.strings b/iOSClient/Supporting Files/mr.lproj/Localizable.strings index aadf86bc19..fb365981eb 100644 Binary files a/iOSClient/Supporting Files/mr.lproj/Localizable.strings and b/iOSClient/Supporting Files/mr.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ms_MY.lproj/Localizable.strings b/iOSClient/Supporting Files/ms_MY.lproj/Localizable.strings index a844943b88..588afaf953 100644 Binary files a/iOSClient/Supporting Files/ms_MY.lproj/Localizable.strings and b/iOSClient/Supporting Files/ms_MY.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/my.lproj/Localizable.strings b/iOSClient/Supporting Files/my.lproj/Localizable.strings index 845a2e161d..76642e4501 100644 Binary files a/iOSClient/Supporting Files/my.lproj/Localizable.strings and b/iOSClient/Supporting Files/my.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/nb-NO.lproj/Localizable.strings b/iOSClient/Supporting Files/nb-NO.lproj/Localizable.strings index 84ca709f70..4140f2af78 100644 Binary files a/iOSClient/Supporting Files/nb-NO.lproj/Localizable.strings and b/iOSClient/Supporting Files/nb-NO.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ne.lproj/Localizable.strings b/iOSClient/Supporting Files/ne.lproj/Localizable.strings index ba9ada0efb..ea7940f5cc 100644 Binary files a/iOSClient/Supporting Files/ne.lproj/Localizable.strings and b/iOSClient/Supporting Files/ne.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/nl.lproj/Localizable.strings b/iOSClient/Supporting Files/nl.lproj/Localizable.strings index 58deed43c0..865ae9859c 100644 Binary files a/iOSClient/Supporting Files/nl.lproj/Localizable.strings and b/iOSClient/Supporting Files/nl.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/nn_NO.lproj/Localizable.strings b/iOSClient/Supporting Files/nn_NO.lproj/Localizable.strings index 5c0c1cce4f..43a4f6b2db 100644 Binary files a/iOSClient/Supporting Files/nn_NO.lproj/Localizable.strings and b/iOSClient/Supporting Files/nn_NO.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/oc.lproj/Localizable.strings b/iOSClient/Supporting Files/oc.lproj/Localizable.strings index cf3da33a7e..1c20fe7d1d 100644 Binary files a/iOSClient/Supporting Files/oc.lproj/Localizable.strings and b/iOSClient/Supporting Files/oc.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/pl.lproj/Localizable.strings b/iOSClient/Supporting Files/pl.lproj/Localizable.strings index fc58b2bfad..eb1a4ad851 100644 Binary files a/iOSClient/Supporting Files/pl.lproj/Localizable.strings and b/iOSClient/Supporting Files/pl.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ps.lproj/Localizable.strings b/iOSClient/Supporting Files/ps.lproj/Localizable.strings index f6a1e686cd..2bb2692793 100644 Binary files a/iOSClient/Supporting Files/ps.lproj/Localizable.strings and b/iOSClient/Supporting Files/ps.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/pt-BR.lproj/Localizable.strings b/iOSClient/Supporting Files/pt-BR.lproj/Localizable.strings index e264e01611..20e89d4ff7 100644 Binary files a/iOSClient/Supporting Files/pt-BR.lproj/Localizable.strings and b/iOSClient/Supporting Files/pt-BR.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/pt-PT.lproj/Localizable.strings b/iOSClient/Supporting Files/pt-PT.lproj/Localizable.strings index 2872877b64..ab8bf1bb09 100644 Binary files a/iOSClient/Supporting Files/pt-PT.lproj/Localizable.strings and b/iOSClient/Supporting Files/pt-PT.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ro.lproj/Localizable.strings b/iOSClient/Supporting Files/ro.lproj/Localizable.strings index 226d3e5bf8..838a41ab55 100644 Binary files a/iOSClient/Supporting Files/ro.lproj/Localizable.strings and b/iOSClient/Supporting Files/ro.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ru.lproj/InfoPlist.strings b/iOSClient/Supporting Files/ru.lproj/InfoPlist.strings index ca962f06e8..1344a41d53 100644 Binary files a/iOSClient/Supporting Files/ru.lproj/InfoPlist.strings and b/iOSClient/Supporting Files/ru.lproj/InfoPlist.strings differ diff --git a/iOSClient/Supporting Files/ru.lproj/Localizable.strings b/iOSClient/Supporting Files/ru.lproj/Localizable.strings index bd8f4013a5..17183198f2 100644 Binary files a/iOSClient/Supporting Files/ru.lproj/Localizable.strings and b/iOSClient/Supporting Files/ru.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/sc.lproj/Localizable.strings b/iOSClient/Supporting Files/sc.lproj/Localizable.strings index efb7320830..2a002e38bd 100644 Binary files a/iOSClient/Supporting Files/sc.lproj/Localizable.strings and b/iOSClient/Supporting Files/sc.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/si.lproj/Localizable.strings b/iOSClient/Supporting Files/si.lproj/Localizable.strings index 543fb61818..cbe5a1b4de 100644 Binary files a/iOSClient/Supporting Files/si.lproj/Localizable.strings and b/iOSClient/Supporting Files/si.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/sk-SK.lproj/Localizable.strings b/iOSClient/Supporting Files/sk-SK.lproj/Localizable.strings index 9f2e8053e2..0e3d04173b 100644 Binary files a/iOSClient/Supporting Files/sk-SK.lproj/Localizable.strings and b/iOSClient/Supporting Files/sk-SK.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/sl.lproj/Localizable.strings b/iOSClient/Supporting Files/sl.lproj/Localizable.strings index 55a45a684c..f20c574daf 100644 Binary files a/iOSClient/Supporting Files/sl.lproj/Localizable.strings and b/iOSClient/Supporting Files/sl.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/sq.lproj/Localizable.strings b/iOSClient/Supporting Files/sq.lproj/Localizable.strings index 443ccf80c2..07d962b3ac 100644 Binary files a/iOSClient/Supporting Files/sq.lproj/Localizable.strings and b/iOSClient/Supporting Files/sq.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/sr.lproj/Localizable.strings b/iOSClient/Supporting Files/sr.lproj/Localizable.strings index 45a6ac569a..1f118ac29c 100644 Binary files a/iOSClient/Supporting Files/sr.lproj/Localizable.strings and b/iOSClient/Supporting Files/sr.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/sr@latin.lproj/Localizable.strings b/iOSClient/Supporting Files/sr@latin.lproj/Localizable.strings index b45b77222a..1e623e1d3e 100644 Binary files a/iOSClient/Supporting Files/sr@latin.lproj/Localizable.strings and b/iOSClient/Supporting Files/sr@latin.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/sv.lproj/Localizable.strings b/iOSClient/Supporting Files/sv.lproj/Localizable.strings index 045616a42c..694f8b80df 100644 Binary files a/iOSClient/Supporting Files/sv.lproj/Localizable.strings and b/iOSClient/Supporting Files/sv.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/sw.lproj/Localizable.strings b/iOSClient/Supporting Files/sw.lproj/Localizable.strings index 9977ce2b14..ac4dbaf021 100644 Binary files a/iOSClient/Supporting Files/sw.lproj/Localizable.strings and b/iOSClient/Supporting Files/sw.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ta.lproj/Localizable.strings b/iOSClient/Supporting Files/ta.lproj/Localizable.strings index 3f1a2dc869..9bb7b3b339 100644 Binary files a/iOSClient/Supporting Files/ta.lproj/Localizable.strings and b/iOSClient/Supporting Files/ta.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/th_TH.lproj/Localizable.strings b/iOSClient/Supporting Files/th_TH.lproj/Localizable.strings index 5b5b5536c4..8fa3d99f63 100644 Binary files a/iOSClient/Supporting Files/th_TH.lproj/Localizable.strings and b/iOSClient/Supporting Files/th_TH.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/tk.lproj/Localizable.strings b/iOSClient/Supporting Files/tk.lproj/Localizable.strings index 8eb8dc66b5..7248501819 100644 Binary files a/iOSClient/Supporting Files/tk.lproj/Localizable.strings and b/iOSClient/Supporting Files/tk.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/tr.lproj/Localizable.strings b/iOSClient/Supporting Files/tr.lproj/Localizable.strings index cf618c24af..40c53d5290 100644 Binary files a/iOSClient/Supporting Files/tr.lproj/Localizable.strings and b/iOSClient/Supporting Files/tr.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ug.lproj/Localizable.strings b/iOSClient/Supporting Files/ug.lproj/Localizable.strings index 978b53983d..87f64bc8df 100644 Binary files a/iOSClient/Supporting Files/ug.lproj/Localizable.strings and b/iOSClient/Supporting Files/ug.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/uk.lproj/Localizable.strings b/iOSClient/Supporting Files/uk.lproj/Localizable.strings index 63c46517d1..7c4215d813 100644 Binary files a/iOSClient/Supporting Files/uk.lproj/Localizable.strings and b/iOSClient/Supporting Files/uk.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/ur_PK.lproj/Localizable.strings b/iOSClient/Supporting Files/ur_PK.lproj/Localizable.strings index 3fdc3fe0a2..56765571c6 100644 Binary files a/iOSClient/Supporting Files/ur_PK.lproj/Localizable.strings and b/iOSClient/Supporting Files/ur_PK.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/uz.lproj/Localizable.strings b/iOSClient/Supporting Files/uz.lproj/Localizable.strings index 9977ce2b14..ac4dbaf021 100644 Binary files a/iOSClient/Supporting Files/uz.lproj/Localizable.strings and b/iOSClient/Supporting Files/uz.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/vi.lproj/Localizable.strings b/iOSClient/Supporting Files/vi.lproj/Localizable.strings index 50e325ec73..bac583f79c 100644 Binary files a/iOSClient/Supporting Files/vi.lproj/Localizable.strings and b/iOSClient/Supporting Files/vi.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/zh-Hans.lproj/Localizable.strings b/iOSClient/Supporting Files/zh-Hans.lproj/Localizable.strings index 7007d068f6..8a089f39dd 100644 Binary files a/iOSClient/Supporting Files/zh-Hans.lproj/Localizable.strings and b/iOSClient/Supporting Files/zh-Hans.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/zh-Hant-TW.lproj/Localizable.strings b/iOSClient/Supporting Files/zh-Hant-TW.lproj/Localizable.strings index ad6c4387a4..717581b18b 100644 Binary files a/iOSClient/Supporting Files/zh-Hant-TW.lproj/Localizable.strings and b/iOSClient/Supporting Files/zh-Hant-TW.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/zh_HK.lproj/Localizable.strings b/iOSClient/Supporting Files/zh_HK.lproj/Localizable.strings index 2bfa36577e..1d130e3d74 100644 Binary files a/iOSClient/Supporting Files/zh_HK.lproj/Localizable.strings and b/iOSClient/Supporting Files/zh_HK.lproj/Localizable.strings differ diff --git a/iOSClient/Supporting Files/zu_ZA.lproj/Localizable.strings b/iOSClient/Supporting Files/zu_ZA.lproj/Localizable.strings index 9977ce2b14..ac4dbaf021 100644 Binary files a/iOSClient/Supporting Files/zu_ZA.lproj/Localizable.strings and b/iOSClient/Supporting Files/zu_ZA.lproj/Localizable.strings differ diff --git a/iOSClient/Transfers/NCTransfers.swift b/iOSClient/Transfers/NCTransfers.swift index a118bd42e7..6a4018cd54 100644 --- a/iOSClient/Transfers/NCTransfers.swift +++ b/iOSClient/Transfers/NCTransfers.swift @@ -63,10 +63,18 @@ class NCTransfers: NCCollectionViewCommon, NCTransferCellDelegate { // MARK: - NotificationCenter + override func reloadDataSource(_ notification: NSNotification) { + reloadDataSource() + } + override func deleteFile(_ notification: NSNotification) { reloadDataSource() } + override func copyMoveFile(_ notification: NSNotification) { + reloadDataSource() + } + override func renameFile(_ notification: NSNotification) { reloadDataSource() } @@ -75,7 +83,7 @@ class NCTransfers: NCCollectionViewCommon, NCTransferCellDelegate { reloadDataSource() } - override func copyMoveFile(_ notification: NSNotification) { + override func favoriteFile(_ notification: NSNotification) { reloadDataSource() } @@ -314,7 +322,7 @@ class NCTransfers: NCCollectionViewCommon, NCTransferCellDelegate { override func reloadDataSource() { if let results = self.database.getResultsMetadatas(predicate: NSPredicate(format: "status != %i", NCGlobal.shared.metadataStatusNormal), sortedByKeyPath: "sessionDate", ascending: true) { - self.dataSource = NCCollectionViewDataSource(results: results, layoutForView: layoutForView) + self.dataSource = NCCollectionViewDataSource(metadatas: Array(results.freeze()), layoutForView: layoutForView) } else { self.dataSource.removeAll() } diff --git a/iOSClient/Utility/NCCameraRoll.swift b/iOSClient/Utility/NCCameraRoll.swift index 7b6dc0204b..1cc8ad28c4 100644 --- a/iOSClient/Utility/NCCameraRoll.swift +++ b/iOSClient/Utility/NCCameraRoll.swift @@ -62,8 +62,8 @@ class NCCameraRoll: NSObject { metadataSource.session = NCNetworking.shared.sessionUpload } metadataSource.isExtractFile = true - if let metadata = self.database.addMetadata(metadataSource) { - metadatas.append(tableMetadata(value: metadata)) + if let metadata = self.database.createMetadata(metadataSource) { + metadatas.append(metadata) } return completition(metadatas) } @@ -76,8 +76,8 @@ class NCCameraRoll: NSObject { let fetchAssets = PHAsset.fetchAssets(withLocalIdentifiers: [metadataSource.assetLocalIdentifier], options: nil) if metadata.isLivePhoto, fetchAssets.count > 0 { self.createMetadataLivePhoto(metadata: metadata, asset: fetchAssets.firstObject) { metadata in - if let metadata, let metadata = self.database.addMetadata(metadata) { - metadatas.append(tableMetadata(value: metadata)) + if let metadata, let metadata = self.database.createMetadata(metadata) { + metadatas.append(metadata) } completition(metadatas) } @@ -126,8 +126,8 @@ class NCCameraRoll: NSObject { metadata.session = NCNetworking.shared.sessionUpload } metadata.isExtractFile = true - if let metadata = self.database.addMetadata(metadata) { - metadataReturn = tableMetadata(value: metadata) + if let metadata = self.database.createMetadata(metadata) { + metadataReturn = metadata } } completion(metadataReturn, fileNamePath, error) @@ -288,9 +288,8 @@ class NCCameraRoll: NSObject { metadataLivePhoto.creationDate = metadata.creationDate metadataLivePhoto.date = metadata.date metadataLivePhoto.uploadDate = metadata.uploadDate - if let metadata = self.database.addMetadata(metadataLivePhoto) { - let returnMetadata = tableMetadata(value: metadata) - return completion(returnMetadata) + if let metadata = self.database.createMetadata(metadataLivePhoto) { + return completion(metadata) } completion(nil) } diff --git a/iOSClient/Utility/NCContentPresenter.swift b/iOSClient/Utility/NCContentPresenter.swift index cf2085e0a0..5c45e36ac4 100644 --- a/iOSClient/Utility/NCContentPresenter.swift +++ b/iOSClient/Utility/NCContentPresenter.swift @@ -122,7 +122,8 @@ class NCContentPresenter: NSObject { } } if error.errorDescription.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty { return } - let description = NSLocalizedString(error.errorDescription, comment: "") + var description = NSLocalizedString(error.errorDescription, comment: "") + description = description.replacingOccurrences(of: "\t", with: "\n") self.flatTop(title: NSLocalizedString(title, comment: ""), description: description + responseMessage, delay: delay, type: type, priority: priority, dropEnqueuedEntries: dropEnqueuedEntries) } } diff --git a/iOSClient/Utility/ScreenAwakeManager/ScreenAwakeManager.swift b/iOSClient/Utility/ScreenAwakeManager/ScreenAwakeManager.swift index 43af39ecf6..28d17bab31 100644 --- a/iOSClient/Utility/ScreenAwakeManager/ScreenAwakeManager.swift +++ b/iOSClient/Utility/ScreenAwakeManager/ScreenAwakeManager.swift @@ -9,13 +9,6 @@ // Modified from https://github.com/ochococo/Insomnia import UIKit -/** - - Sometimes you want your iPhone to stay active a little bit longer is it an import or just game interface. - - This simple class aims to simplify the code and give you a well tested solution. - - */ class ScreenAwakeManager { static let shared: ScreenAwakeManager = { let instance = ScreenAwakeManager() diff --git a/iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayer.swift b/iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayer.swift index c3aac0db24..1c89774f70 100644 --- a/iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayer.swift +++ b/iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayer.swift @@ -74,6 +74,7 @@ class NCPlayer: NSObject { player.stop() print("deinit NCPlayer with ocId \(metadata.ocId)") NotificationCenter.default.removeObserver(self, name: UIApplication.didEnterBackgroundNotification, object: nil) + NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterPlayerStoppedPlaying) } func openAVPlayer(url: URL, autoplay: Bool = false) { @@ -166,7 +167,7 @@ class NCPlayer: NSObject { // MARK: - - func isPlay() -> Bool { + func isPlaying() -> Bool { return player.isPlaying } @@ -201,7 +202,7 @@ class NCPlayer: NSObject { } func savePosition() { - guard metadata.isVideo, isPlay() else { return } + guard metadata.isVideo, isPlaying() else { return } self.database.addVideo(metadata: metadata, position: player.position) } @@ -228,6 +229,9 @@ extension NCPlayer: VLCMediaPlayerDelegate { switch player.state { case .stopped: playerToolBar?.playButtonPlay() + + NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterPlayerStoppedPlaying) + print("Played mode: STOPPED") case .opening: print("Played mode: OPENING") @@ -273,8 +277,13 @@ extension NCPlayer: VLCMediaPlayerDelegate { self.height = Int(size.height) playerToolBar.updateTopToolBar(videoSubTitlesIndexes: player.videoSubTitlesIndexes, audioTrackIndexes: player.audioTrackIndexes) self.database.addVideo(metadata: metadata, width: self.width, height: self.height, length: self.length) + + NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterPlayerIsPlaying) + print("Played mode: PLAYING") case .paused: + NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterPlayerStoppedPlaying) + playerToolBar?.playButtonPlay() print("Played mode: PAUSED") default: break diff --git a/iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift b/iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift index 4aa84be3d5..fafdec1b8b 100644 --- a/iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift +++ b/iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift @@ -277,7 +277,7 @@ class NCPlayerToolBar: UIView { @IBAction func tapPlayerPause(_ sender: Any) { guard let ncplayer = ncplayer else { return } - if ncplayer.isPlay() { + if ncplayer.isPlaying() { ncplayer.playerPause() } else { ncplayer.playerPlay() diff --git a/iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift b/iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift index 84a1b2bfa8..2d3bd71414 100644 --- a/iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift +++ b/iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift @@ -211,7 +211,7 @@ class NCViewerMedia: UIViewController { override func viewDidDisappear(_ animated: Bool) { super.viewDidDisappear(animated) - if let ncplayer = ncplayer, ncplayer.isPlay() { + if let ncplayer = ncplayer, ncplayer.isPlaying() { ncplayer.playerPause() } } diff --git a/iOSClient/Viewer/NCViewerMedia/NCViewerMediaPage.swift b/iOSClient/Viewer/NCViewerMedia/NCViewerMediaPage.swift index 44d1f2e8db..1361b05bdb 100644 --- a/iOSClient/Viewer/NCViewerMedia/NCViewerMediaPage.swift +++ b/iOSClient/Viewer/NCViewerMedia/NCViewerMediaPage.swift @@ -335,7 +335,7 @@ class NCViewerMediaPage: UIViewController { if metadata.isAudioOrVideo, let ncplayer = self.currentViewController.ncplayer { let url = URL(fileURLWithPath: self.utilityFileSystem.getDirectoryProviderStorageOcId(metadata.ocId, fileNameView: metadata.fileNameView)) - if ncplayer.isPlay() { + if ncplayer.isPlaying() { ncplayer.playerPause() DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { ncplayer.openAVPlayer(url: url) @@ -386,7 +386,7 @@ class NCViewerMediaPage: UIViewController { NCContentPresenter().showError(error: error) } - if let ncplayer = currentViewController.ncplayer, ncplayer.isPlay() { + if let ncplayer = currentViewController.ncplayer, ncplayer.isPlaying() { ncplayer.playerPause() } @@ -410,7 +410,7 @@ class NCViewerMediaPage: UIViewController { MPRemoteCommandCenter.shared().playCommand.isEnabled = true playCommand = MPRemoteCommandCenter.shared().playCommand.addTarget { _ in - if !ncplayer.isPlay() { + if !ncplayer.isPlaying() { ncplayer.playerPlay() return .success } @@ -421,7 +421,7 @@ class NCViewerMediaPage: UIViewController { MPRemoteCommandCenter.shared().pauseCommand.isEnabled = true pauseCommand = MPRemoteCommandCenter.shared().pauseCommand.addTarget { _ in - if ncplayer.isPlay() { + if ncplayer.isPlaying() { ncplayer.playerPause() return .success }