From b309fc09f6cb62dba91b0e17ebf86f88f45566a2 Mon Sep 17 00:00:00 2001 From: sk Date: Wed, 21 Dec 2022 21:53:12 +0100 Subject: [PATCH] tweak item header and notification deletion --- .../org/joinmastodon/android/ui/utils/UiUtils.java | 6 +++--- .../res/drawable/ic_fluent_dismiss_20_filled.xml | 3 +++ .../ic_fluent_mail_inbox_dismiss_24_regular.xml | 3 +++ mastodon/src/main/res/layout/display_item_header.xml | 12 ++++++------ mastodon/src/main/res/menu/notifications.xml | 8 ++++---- mastodon/src/main/res/values-de-rDE/strings_sk.xml | 6 +++--- mastodon/src/main/res/values/strings_sk.xml | 6 +++--- 7 files changed, 25 insertions(+), 19 deletions(-) create mode 100644 mastodon/src/main/res/drawable/ic_fluent_dismiss_20_filled.xml create mode 100644 mastodon/src/main/res/drawable/ic_fluent_mail_inbox_dismiss_24_regular.xml diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/utils/UiUtils.java b/mastodon/src/main/java/org/joinmastodon/android/ui/utils/UiUtils.java index ccf07fd3d..5e45aaa15 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/utils/UiUtils.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/utils/UiUtils.java @@ -467,9 +467,9 @@ public class UiUtils{ public static void confirmDeleteNotification(Activity activity, String accountID, Notification notification, Runnable callback) { showConfirmationAlert(activity, - notification == null ? R.string.sk_delete_all_notifications : R.string.sk_delete_notification, - notification == null ? R.string.sk_delete_all_notifications_confirm : R.string.sk_delete_notification_confirm, - notification == null ? R.string.sk_delete_all_notifications_confirm_action : R.string.sk_delete_notification_confirm_action, + notification == null ? R.string.sk_clear_all_notifications : R.string.sk_delete_notification, + notification == null ? R.string.sk_clear_all_notifications_confirm : R.string.sk_delete_notification_confirm, + notification == null ? R.string.sk_clear_all_notifications_confirm_action : R.string.sk_delete_notification_confirm_action, ()-> new DismissNotification(notification != null ? notification.id : null).setCallback(new Callback<>() { @Override public void onSuccess(Object o) { diff --git a/mastodon/src/main/res/drawable/ic_fluent_dismiss_20_filled.xml b/mastodon/src/main/res/drawable/ic_fluent_dismiss_20_filled.xml new file mode 100644 index 000000000..331183ba2 --- /dev/null +++ b/mastodon/src/main/res/drawable/ic_fluent_dismiss_20_filled.xml @@ -0,0 +1,3 @@ + + + diff --git a/mastodon/src/main/res/drawable/ic_fluent_mail_inbox_dismiss_24_regular.xml b/mastodon/src/main/res/drawable/ic_fluent_mail_inbox_dismiss_24_regular.xml new file mode 100644 index 000000000..e32e4fab5 --- /dev/null +++ b/mastodon/src/main/res/drawable/ic_fluent_mail_inbox_dismiss_24_regular.xml @@ -0,0 +1,3 @@ + + + diff --git a/mastodon/src/main/res/layout/display_item_header.xml b/mastodon/src/main/res/layout/display_item_header.xml index f21284911..4adb201c0 100644 --- a/mastodon/src/main/res/layout/display_item_header.xml +++ b/mastodon/src/main/res/layout/display_item_header.xml @@ -26,13 +26,13 @@ android:layout_width="36dp" android:layout_height="36dp" android:layout_marginTop="-6dp" - android:layout_marginEnd="6dp" + android:layout_marginEnd="2dp" android:layout_toStartOf="@id/more" android:visibility="gone" android:background="?android:selectableItemBackgroundBorderless" android:contentDescription="@string/sk_delete_notification" android:scaleType="center" - android:src="@drawable/ic_fluent_delete_20_filled" + android:src="@drawable/ic_fluent_dismiss_20_filled" android:tint="?android:textColorSecondary" /> diff --git a/mastodon/src/main/res/menu/notifications.xml b/mastodon/src/main/res/menu/notifications.xml index 69cd7e26c..8518a9f11 100644 --- a/mastodon/src/main/res/menu/notifications.xml +++ b/mastodon/src/main/res/menu/notifications.xml @@ -3,13 +3,13 @@ + android:title="@string/sk_clear_all_notifications" /> \ No newline at end of file diff --git a/mastodon/src/main/res/values-de-rDE/strings_sk.xml b/mastodon/src/main/res/values-de-rDE/strings_sk.xml index e2438d9a2..aa82a5419 100644 --- a/mastodon/src/main/res/values-de-rDE/strings_sk.xml +++ b/mastodon/src/main/res/values-de-rDE/strings_sk.xml @@ -71,12 +71,12 @@ Wischen zwischen Tabs deaktivieren Benachrichtigung löschen Benachrichtigung wirklich löschen\? - Alle löschen + Alle löschen Löschen von Benachrichtigungen aktivieren Veröffentlichen-Button-Text Übersetzen-Button in der Timeline ausblenden Benachrichtigung löschen - Alle Benachrichtigungen löschen + Alle Benachrichtigungen löschen Veröffentlichen-Button-Text anpassen - Wirklich alle Benachrichtigungen löschen\? + Wirklich alle Benachrichtigungen löschen\? \ No newline at end of file diff --git a/mastodon/src/main/res/values/strings_sk.xml b/mastodon/src/main/res/values/strings_sk.xml index 648161793..e3e619343 100644 --- a/mastodon/src/main/res/values/strings_sk.xml +++ b/mastodon/src/main/res/values/strings_sk.xml @@ -73,9 +73,9 @@ Delete notification Delete notification Are you sure you want to delete this notification? - Delete all notifications - Delete all - Are you sure you want to delete all notifications\? + Clear all notifications + Delete all + Are you sure you want to clear all notifications\? Enable deleting notifications Publish button text Customize Publish button text