Skip to content

Commit

Permalink
Version 4.9.6 (#2706)
Browse files Browse the repository at this point in the history
Signed-off-by: Nextcloud bot <[email protected]>
Signed-off-by: Marino Faggiana <[email protected]>
Co-authored-by: Nextcloud bot <[email protected]>
  • Loading branch information
marinofaggiana and nextcloud-bot authored Dec 14, 2023
1 parent a83f6c4 commit f72360b
Show file tree
Hide file tree
Showing 18 changed files with 108 additions and 194 deletions.
10 changes: 5 additions & 5 deletions Nextcloud.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -4873,7 +4873,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = NKUJUXUJ3B;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand All @@ -4899,7 +4899,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 4.9.5;
MARKETING_VERSION = 4.9.6;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "";
SDKROOT = iphoneos;
Expand Down Expand Up @@ -4938,7 +4938,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = NKUJUXUJ3B;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand All @@ -4961,7 +4961,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 4.9.5;
MARKETING_VERSION = 4.9.6;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "";
SDKROOT = iphoneos;
Expand Down Expand Up @@ -5253,7 +5253,7 @@
repositoryURL = "https://github.com/nextcloud/NextcloudKit";
requirement = {
kind = exactVersion;
version = 2.9.3;
version = 2.9.4;
};
};
F788ECC5263AAAF900ADC67F /* XCRemoteSwiftPackageReference "MarkdownKit" */ = {
Expand Down
4 changes: 2 additions & 2 deletions iOSClient/Data/NCDataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class NCDataSource: NSObject {
// get all Section
for metadata in self.metadatas {
// skipped livePhoto VIDEO part
if metadata.isLivePhoto && metadata.classFile == NKCommon.TypeClassFile.video.rawValue {
if metadata.isLivePhoto && metadata.classFile == NKCommon.TypeClassFile.video.rawValue && metadata.status <= NCGlobal.shared.metadataStatusNormal {
continue
}
let section = NSLocalizedString(self.getSectionValue(metadata: metadata), comment: "")
Expand Down Expand Up @@ -424,7 +424,7 @@ class NCMetadataForSection: NSObject {
}

// skipped livePhoto
if metadata.isLivePhoto && metadata.classFile == NKCommon.TypeClassFile.video.rawValue {
if metadata.isLivePhoto && metadata.classFile == NKCommon.TypeClassFile.video.rawValue && metadata.status <= NCGlobal.shared.metadataStatusNormal {
continue
}

Expand Down
17 changes: 5 additions & 12 deletions iOSClient/Main/Collection Common/NCCollectionViewCommon.swift
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,6 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
if error != .success {
NCContentPresenter().showError(error: error)
}

if let hud = userInfo["hud"] as? JGProgressHUD {
hud.dismiss()
}
}

@objc func moveFile(_ notification: NSNotification) {
Expand All @@ -339,10 +335,11 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS

@objc func copyFile(_ notification: NSNotification) {

guard let userInfo = notification.userInfo as NSDictionary? else { return }
guard let userInfo = notification.userInfo as NSDictionary?,
let error = userInfo["error"] as? NKError else { return }

if let hud = userInfo["hud"] as? JGProgressHUD {
hud.dismiss()
if error != .success {
NCContentPresenter().showError(error: error)
}
}

Expand All @@ -353,11 +350,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
account == appDelegate.account
else { return }

if isSearchingMode {
reloadDataSourceNetwork()
} else {
reloadDataSource()
}
reloadDataSourceNetwork(isForced: true)
}

@objc func createFolder(_ notification: NSNotification) {
Expand Down
3 changes: 1 addition & 2 deletions iOSClient/Main/Create cloud/NCCreateFormUploadConflict.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import UIKit
import SwiftUI
import NextcloudKit
import Photos
import JGProgressHUD

protocol NCCreateFormUploadConflictDelegate: AnyObject {
func dismissCreateFormUploadConflict(metadatas: [tableMetadata]?)
Expand Down Expand Up @@ -391,7 +390,7 @@ extension NCCreateFormUploadConflict: UITableViewDataSource {

// PREVIEW
let cameraRoll = NCCameraRoll()
cameraRoll.extractImageVideoFromAssetLocalIdentifier(metadata: metadataNewFile, modifyMetadataForUpload: false, viewController: self, hud: JGProgressHUD()) { _, fileNamePath, error in
cameraRoll.extractImageVideoFromAssetLocalIdentifier(metadata: metadataNewFile, modifyMetadataForUpload: false) { _, fileNamePath, error in
if !error {
self.fileNamesPath[metadataNewFile.fileNameView] = fileNamePath!
do {
Expand Down
10 changes: 2 additions & 8 deletions iOSClient/Main/NCActionCenter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -598,12 +598,6 @@ class NCActionCenter: NSObject, UIDocumentInteractionControllerDelegate, NCSelec

func dismissSelect(serverUrl: String?, metadata: tableMetadata?, type: String, items: [Any], indexPath: [IndexPath], overwrite: Bool, copy: Bool, move: Bool) {
if let serverUrl, !items.isEmpty {
let hud = JGProgressHUD()
hud.textLabel.text = copy ? NSLocalizedString("_copying_progess_", comment: "") : NSLocalizedString("_moving_progess_", comment: "")
if let appDelegate = UIApplication.shared.delegate as? AppDelegate,
let view = appDelegate.window?.rootViewController?.view {
hud.show(in: view)
}
if copy {
Task {
var error = NKError()
Expand All @@ -617,7 +611,7 @@ class NCActionCenter: NSObject, UIDocumentInteractionControllerDelegate, NCSelec
if error != .success {
NCContentPresenter().showError(error: error)
}
NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterCopyFile, userInfo: ["ocId": ocId, "indexPath": indexPath, "error": error, "hud": hud])
NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterCopyFile, userInfo: ["ocId": ocId, "indexPath": indexPath, "error": error])
}
} else {
Task {
Expand All @@ -632,7 +626,7 @@ class NCActionCenter: NSObject, UIDocumentInteractionControllerDelegate, NCSelec
if error != .success {
NCContentPresenter().showError(error: error)
}
NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterMoveFile, userInfo: ["ocId": ocId, "indexPath": indexPath, "error": error, "hud": hud])
NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterMoveFile, userInfo: ["ocId": ocId, "indexPath": indexPath, "error": error])
}
}
}
Expand Down
7 changes: 2 additions & 5 deletions iOSClient/Media/NCMedia.swift
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,10 @@ class NCMedia: UIViewController, NCEmptyDataSetDelegate, NCSelectDelegate {
guard let userInfo = notification.userInfo as NSDictionary?,
let error = userInfo["error"] as? NKError else { return }

if error != .success {
NCContentPresenter().showError(error: error)
}
self.reloadDataSource()

if let hud = userInfo["hud"] as? JGProgressHUD {
hud.dismiss()
if error != .success {
NCContentPresenter().showError(error: error)
}
}

Expand Down
8 changes: 1 addition & 7 deletions iOSClient/Menu/NCContextMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,6 @@ class NCContextMenu: NSObject {
}
let alertController = UIAlertController(title: nil, message: nil, preferredStyle: alertStyle)
alertController.addAction(UIAlertAction(title: NSLocalizedString("_delete_file_", comment: ""), style: .destructive) { _ in
let hud = JGProgressHUD()
hud.textLabel.text = NSLocalizedString("_deletion_progess_", comment: "")
if let appDelegate = UIApplication.shared.delegate as? AppDelegate,
let view = appDelegate.window?.rootViewController?.view {
hud.show(in: view)
}
Task {
var ocId: [String] = []
let error = await NCNetworking.shared.deleteMetadata(metadata, onlyLocalCache: false)
Expand All @@ -169,7 +163,7 @@ class NCContextMenu: NSObject {
} else {
NCContentPresenter().showError(error: error)
}
NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterDeleteFile, userInfo: ["ocId": ocId, "indexPath": [indexPath], "onlyLocalCache": false, "error": error, "hud": hud])
NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterDeleteFile, userInfo: ["ocId": ocId, "indexPath": [indexPath], "onlyLocalCache": false, "error": error])
}
})
alertController.addAction(UIAlertAction(title: NSLocalizedString("_cancel_", comment: ""), style: .cancel) { _ in })
Expand Down
8 changes: 1 addition & 7 deletions iOSClient/Menu/NCMenuAction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,6 @@ extension NCMenuAction {
preferredStyle: .alert)
if canDeleteServer {
alertController.addAction(UIAlertAction(title: NSLocalizedString("_yes_delete_", comment: ""), style: .default) { (_: UIAlertAction) in
let hud = JGProgressHUD()
hud.textLabel.text = NSLocalizedString("_deletion_progess_", comment: "")
if let appDelegate = UIApplication.shared.delegate as? AppDelegate,
let view = appDelegate.window?.rootViewController?.view {
hud.show(in: view)
}
Task {
var error = NKError()
var ocId: [String] = []
Expand All @@ -161,7 +155,7 @@ extension NCMenuAction {
ocId.append(metadata.ocId)
}
}
NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterDeleteFile, userInfo: ["ocId": ocId, "indexPath": indexPath, "onlyLocalCache": false, "error": error, "hud": hud])
NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterDeleteFile, userInfo: ["ocId": ocId, "indexPath": indexPath, "onlyLocalCache": false, "error": error])
}
completion?()
})
Expand Down
6 changes: 3 additions & 3 deletions iOSClient/NCGlobal.swift
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,9 @@ class NCGlobal: NSObject {
let notificationCenterProgressTask = "progressTask" // userInfo: account, ocId, serverUrl, status, chunk, e2eEncrypted, progress, totalBytes, totalBytesExpected

let notificationCenterCreateFolder = "createFolder" // userInfo: ocId, serverUrl, account, withPush
let notificationCenterDeleteFile = "deleteFile" // userInfo: [ocId], [indexPath], onlyLocalCache, error, hud?
let notificationCenterMoveFile = "moveFile" // userInfo: [ocId], [indexPath], error, hud?
let notificationCenterCopyFile = "copyFile" // userInfo: [ocId], [indexPath], error, hud?
let notificationCenterDeleteFile = "deleteFile" // userInfo: [ocId], [indexPath], onlyLocalCache, error
let notificationCenterMoveFile = "moveFile" // userInfo: [ocId], [indexPath], error
let notificationCenterCopyFile = "copyFile" // userInfo: [ocId], [indexPath], error
let notificationCenterRenameFile = "renameFile" // userInfo: ocId, account, indexPath
let notificationCenterFavoriteFile = "favoriteFile" // userInfo: ocId, serverUrl

Expand Down
Loading

0 comments on commit f72360b

Please sign in to comment.