зеркало из https://github.com/nextcloud/desktop.git
Merge pull request #7328 from nextcloud/bugfix/global-progress-vfs-bigsur
Check for availability of Big Sur (under 11.3) before using VFS progress tracking method
This commit is contained in:
Коммит
544ae0b33e
|
@ -42,17 +42,19 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
NSProgress *const downloadProgress = [_manager globalProgressForKind:NSProgressFileOperationKindDownloading];
|
||||
NSProgress *const uploadProgress = [_manager globalProgressForKind:NSProgressFileOperationKindUploading];
|
||||
_downloadProgressObserver = [[ProgressObserver alloc] initWithProgress:downloadProgress];
|
||||
_uploadProgressObserver = [[ProgressObserver alloc] initWithProgress:uploadProgress];
|
||||
if (@available(macOS 11.3, *)) {
|
||||
NSProgress *const downloadProgress = [_manager globalProgressForKind:NSProgressFileOperationKindDownloading];
|
||||
NSProgress *const uploadProgress = [_manager globalProgressForKind:NSProgressFileOperationKindUploading];
|
||||
_downloadProgressObserver = [[ProgressObserver alloc] initWithProgress:downloadProgress];
|
||||
_uploadProgressObserver = [[ProgressObserver alloc] initWithProgress:uploadProgress];
|
||||
|
||||
_downloadProgressObserver.progressKVOChangeHandler = ^(NSProgress *const progress){
|
||||
updateDownload(progress);
|
||||
};
|
||||
_uploadProgressObserver.progressKVOChangeHandler = ^(NSProgress *const progress){
|
||||
updateUpload(progress);
|
||||
};
|
||||
_downloadProgressObserver.progressKVOChangeHandler = ^(NSProgress *const progress){
|
||||
updateDownload(progress);
|
||||
};
|
||||
_uploadProgressObserver.progressKVOChangeHandler = ^(NSProgress *const progress){
|
||||
updateUpload(progress);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
~MacImplementation() = default;
|
||||
|
|
Загрузка…
Ссылка в новой задаче