commit 61a451184b19f9f38c1cd0b75a6d6e117d65144c
parent 96741af97b3ab33deba8643a2a34c8f725e4a483
Author: Joel Klabo <joelklabo@gmail.com>
Date: Thu, 5 Jan 2023 13:06:36 -0800
Allow Saving Images to Library
Closes: #255
Changelog-Added: Allow Saving Images to Library
Diffstat:
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/damus/Components/ImageCarousel.swift b/damus/Components/ImageCarousel.swift
@@ -49,6 +49,11 @@ struct ImageContextMenuModifier: ViewModifier {
} label: {
Label("Copy Image", systemImage: "photo.on.rectangle")
}
+ Button {
+ UIImageWriteToSavedPhotosAlbum(someImage, nil, nil, nil)
+ } label: {
+ Label("Save Image", systemImage: "square.and.arrow.down")
+ }
}
Button {
showShareSheet = true
diff --git a/damus/Info.plist b/damus/Info.plist
@@ -15,6 +15,8 @@
</array>
</dict>
</array>
+ <key>NSPhotoLibraryAddUsageDescription</key>
+ <string>"Granting Damus access to your photo library allows you to save photos.</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>river</string>