mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-23 07:36:48 +00:00
Improved PR following reviewer recommendations
This commit is contained in:
parent
fd88496dcb
commit
49899ccb2c
2 changed files with 11 additions and 11 deletions
|
@ -1545,7 +1545,7 @@
|
||||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking";
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking";
|
||||||
INFOPLIST_KEY_NSCameraUsageDescription = "Upload photos & videos to attach to your Mastodon posts.";
|
INFOPLIST_KEY_NSCameraUsageDescription = "Upload photos & videos to attach to your Mastodon posts.";
|
||||||
INFOPLIST_KEY_NSHumanReadableCopyright = "© 2024 Thomas Ricouard";
|
INFOPLIST_KEY_NSHumanReadableCopyright = "© 2024 Thomas Ricouard";
|
||||||
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "";
|
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "Ice Cubes would like to save the selected photo in your photo library.";
|
||||||
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "Upload photos & videos to Mastodon";
|
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "Upload photos & videos to Mastodon";
|
||||||
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
|
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
|
||||||
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
|
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
|
||||||
|
@ -1612,7 +1612,7 @@
|
||||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking";
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking";
|
||||||
INFOPLIST_KEY_NSCameraUsageDescription = "Upload photos & videos to attach to your Mastodon posts.";
|
INFOPLIST_KEY_NSCameraUsageDescription = "Upload photos & videos to attach to your Mastodon posts.";
|
||||||
INFOPLIST_KEY_NSHumanReadableCopyright = "© 2024 Thomas Ricouard";
|
INFOPLIST_KEY_NSHumanReadableCopyright = "© 2024 Thomas Ricouard";
|
||||||
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "";
|
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "Ice Cubes would like to save the selected photo in your photo library.";
|
||||||
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "Upload photos & videos to Mastodon";
|
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "Upload photos & videos to Mastodon";
|
||||||
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
|
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
|
||||||
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
|
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
|
||||||
|
|
|
@ -185,9 +185,10 @@ private struct SavePhotoToolbarItem: ToolbarContent, @unchecked Sendable {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func saveImage(url: URL) async -> Bool {
|
private func saveImage(url: URL) async -> Bool {
|
||||||
|
guard let image = try? await uiimageFor(url: url) else { return false }
|
||||||
|
|
||||||
var status = PHPhotoLibrary.authorizationStatus(for: .addOnly)
|
var status = PHPhotoLibrary.authorizationStatus(for: .addOnly)
|
||||||
|
|
||||||
if let image = try? await uiimageFor(url: url) {
|
|
||||||
if status != .authorized {
|
if status != .authorized {
|
||||||
await PHPhotoLibrary.requestAuthorization(for: .addOnly)
|
await PHPhotoLibrary.requestAuthorization(for: .addOnly)
|
||||||
status = PHPhotoLibrary.authorizationStatus(for: .addOnly)
|
status = PHPhotoLibrary.authorizationStatus(for: .addOnly)
|
||||||
|
@ -196,7 +197,6 @@ private struct SavePhotoToolbarItem: ToolbarContent, @unchecked Sendable {
|
||||||
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil)
|
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue