mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 04:55:48 +03:00
Wrap use of NSFileProviderManager globalProgress in availability check
This selector was only made available on macOS 11.3 Just to be safe we should check for the availability Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
18fb6dc456
commit
d1e26b27f9
1 changed files with 12 additions and 10 deletions
|
@ -42,6 +42,7 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
if (@available(macOS 11.3, *)) {
|
||||
NSProgress *const downloadProgress = [_manager globalProgressForKind:NSProgressFileOperationKindDownloading];
|
||||
NSProgress *const uploadProgress = [_manager globalProgressForKind:NSProgressFileOperationKindUploading];
|
||||
_downloadProgressObserver = [[ProgressObserver alloc] initWithProgress:downloadProgress];
|
||||
|
@ -54,6 +55,7 @@ public:
|
|||
updateUpload(progress);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
~MacImplementation() = default;
|
||||
|
||||
|
|
Loading…
Reference in a new issue