Allow deletion of media through preview.

When viewing a media in the media preview, you can delete it by pressing
a delete button on the action bar. It will then ask you to confirm your
choice. If you confirm, it will delete the attachment from the database
and from disk. If it was the only attachment for that message, the
message itself will also be deleted.
This commit is contained in:
Greyson Parrelli
2018-03-13 18:24:42 -07:00
committed by Moxie Marlinspike
parent a8cf5b8efa
commit 0c768a24e4
7 changed files with 161 additions and 27 deletions

View File

@@ -13,4 +13,8 @@
android:title="@string/media_preview__all_media_title"
android:icon="@drawable/ic_photo_library_white_24dp"
app:showAsAction="ifRoom"/>
<item android:id="@+id/delete"
android:title="@string/delete"
android:icon="@drawable/ic_delete_white_24dp"
app:showAsAction="ifRoom"/>
</menu>

View File

@@ -664,6 +664,8 @@
<string name="MediaPreviewActivity_draft">Draft</string>
<string name="MediaPreviewActivity_signal_needs_the_storage_permission_in_order_to_write_to_external_storage_but_it_has_been_permanently_denied">Signal needs the Storage permission in order to save to external storage, but it has been permanently denied. Please continue to app settings, select \"Permissions\", and enable \"Storage\".</string>
<string name="MediaPreviewActivity_unable_to_write_to_external_storage_without_permission">Unable to save to external storage without permissions</string>
<string name="MediaPreviewActivity_media_delete_confirmation_title">Delete message?</string>
<string name="MediaPreviewActivity_media_delete_confirmation_message">This will permanently delete this message.</string>
<!-- MessageNotifier -->