mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-26 21:37:34 +00:00
Allow batch deletion of media.
It is now possible to batch-delete media in the "media overview" screen. You can long press to enter multi-select mode. Then a delete button appears on the menu bar. After pressing delete, you will get a confirmation, and if the user confirms, the items will delete while a progres dialog shows.
This commit is contained in:

committed by
Moxie Marlinspike

parent
0c768a24e4
commit
10e5b24cfd
@@ -11,4 +11,18 @@
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/media_preview_activity__media_content_description" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/selected_indicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/MediaOverview_Media_selected_overlay"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/check"
|
||||
android:layout_gravity="center"/>
|
||||
</FrameLayout>
|
||||
|
||||
</org.thoughtcrime.securesms.components.SquareFrameLayout>
|
||||
|
7
res/menu/media_overview_context.xml
Normal file
7
res/menu/media_overview_context.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item android:id="@+id/delete"
|
||||
android:title="@string/delete"
|
||||
android:icon="@drawable/ic_delete_white_24dp"
|
||||
app:showAsAction="always"/>
|
||||
</menu>
|
@@ -40,4 +40,6 @@
|
||||
|
||||
<color name="sticker_selected_color">#8cf437</color>
|
||||
<color name="transparent">#00FFFFFF</color>
|
||||
|
||||
<color name="MediaOverview_Media_selected_overlay">#88000000</color>
|
||||
</resources>
|
||||
|
@@ -401,6 +401,16 @@
|
||||
|
||||
<!-- MediaOverviewActivity -->
|
||||
<string name="MediaOverviewActivity_Media">Media</string>
|
||||
<plurals name="MediaOverviewActivity_Media_delete_confirm_title">
|
||||
<item quantity="one">Delete selected message?</item>
|
||||
<item quantity="other">Delete selected messages?</item>
|
||||
</plurals>
|
||||
<plurals name="MediaOverviewActivity_Media_delete_confirm_message">
|
||||
<item quantity="one">This will permanently delete the selected message.</item>
|
||||
<item quantity="other">This will permanently delete all %1$d selected messages.</item>
|
||||
</plurals>
|
||||
<string name="MediaOverviewActivity_Media_delete_progress_title">Deleting</string>
|
||||
<string name="MediaOverviewActivity_Media_delete_progress_message">Deleting messages...</string>
|
||||
<string name="MediaOverviewActivity_Documents">Documents</string>
|
||||
|
||||
<!--- NotificationBarManager -->
|
||||
|
Reference in New Issue
Block a user