From 61a451184b19f9f38c1cd0b75a6d6e117d65144c Mon Sep 17 00:00:00 2001 From: Joel Klabo Date: Thu, 5 Jan 2023 13:06:36 -0800 Subject: [PATCH] Allow Saving Images to Library Closes: #255 Changelog-Added: Allow Saving Images to Library --- damus/Components/ImageCarousel.swift | 5 +++++ damus/Info.plist | 2 ++ 2 files changed, 7 insertions(+) diff --git a/damus/Components/ImageCarousel.swift b/damus/Components/ImageCarousel.swift index 66a4ea24..ff557317 100644 --- 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 index adb4097c..36a8a95f 100644 --- a/damus/Info.plist +++ b/damus/Info.plist @@ -15,6 +15,8 @@ + NSPhotoLibraryAddUsageDescription + "Granting Damus access to your photo library allows you to save photos. LSApplicationQueriesSchemes river