mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-19 21:06:10 +00:00
iOS: Fix share extension showed app introduction, share extension add cancel button, add browse button to settings
This commit is contained in:
1 parent
006f389891
commit
9d71ed35b7
4 files changed
+152
-14
No files matched your search
@@ -124,17 +124,7 @@ public class SaveFilesManager {
|
||||
NSWorkspace.shared.activateFileViewerSelecting(filesFinishedDownloadingSinceLastRun)
|
||||
}
|
||||
#else
|
||||
|
||||
let documentsUrl = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first
|
||||
#if !EXTENSION
|
||||
if let documentsUrl = documentsUrl, let sharedUrl = URL(string: "shareddocuments://\(documentsUrl.path)"), UIApplication.shared.canOpenURL(sharedUrl) {
|
||||
UIApplication.shared.open(sharedUrl, options: [:])
|
||||
}
|
||||
else {
|
||||
showAlert(title: "CouldNotOpenDocumentsFolder", message: "CouldNotOpenDocumentsFolderDescription")
|
||||
}
|
||||
#endif
|
||||
|
||||
openDownloadedFilesFolder()
|
||||
#endif
|
||||
|
||||
// Clear the list of finished files
|
||||
@@ -144,6 +134,20 @@ public class SaveFilesManager {
|
||||
stopAccessingSecurityScopedResource()
|
||||
}
|
||||
|
||||
|
||||
public func openDownloadedFilesFolder() {
|
||||
#if !EXTENSION
|
||||
let documentsUrl = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first
|
||||
|
||||
if let documentsUrl = documentsUrl, let sharedUrl = URL(string: "shareddocuments://\(documentsUrl.path)"), UIApplication.shared.canOpenURL(sharedUrl) {
|
||||
UIApplication.shared.open(sharedUrl, options: [:])
|
||||
}
|
||||
else {
|
||||
showAlert(title: "CouldNotOpenDocumentsFolder", message: "CouldNotOpenDocumentsFolderDescription")
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
public func stopAccessingSecurityScopedResource() {
|
||||
guard let url = securityScopeUrl else {
|
||||
|
||||
Reference in new issue
Block a user