From 02983c76b9dbddbe3081fefe2a5f69a31e247652 Mon Sep 17 00:00:00 2001 From: sk Date: Sun, 22 Oct 2023 23:09:35 +0200 Subject: [PATCH] add mutuals follow button state closes sk22#890 --- .../android/ui/utils/UiUtils.java | 4 +-- .../drawable/bg_button_m3_tonal_outlined.xml | 27 +++++++++++++++++++ .../src/main/res/values-de-rDE/strings_sk.xml | 1 + mastodon/src/main/res/values/strings_sk.xml | 1 + mastodon/src/main/res/values/styles.xml | 3 +++ 5 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 mastodon/src/main/res/drawable/bg_button_m3_tonal_outlined.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 f139d756e..187b89ac4 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 @@ -779,8 +779,8 @@ public class UiUtils { button.setText(relationship.followedBy ? R.string.follow_back : R.string.button_follow); styleRes=R.style.Widget_Mastodon_M3_Button_Filled; }else{ - button.setText(R.string.button_following); - styleRes=R.style.Widget_Mastodon_M3_Button_Tonal; + button.setText(relationship.followedBy ? R.string.sk_button_mutuals : R.string.button_following); + styleRes=relationship.followedBy ? R.style.Widget_Mastodon_M3_Button_Tonal_Outlined : R.style.Widget_Mastodon_M3_Button_Tonal; } TypedArray ta=button.getContext().obtainStyledAttributes(styleRes, new int[]{android.R.attr.background}); diff --git a/mastodon/src/main/res/drawable/bg_button_m3_tonal_outlined.xml b/mastodon/src/main/res/drawable/bg_button_m3_tonal_outlined.xml new file mode 100644 index 000000000..d06d0a9f6 --- /dev/null +++ b/mastodon/src/main/res/drawable/bg_button_m3_tonal_outlined.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + 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 ca92c4d93..3543a1249 100644 --- a/mastodon/src/main/res/values-de-rDE/strings_sk.xml +++ b/mastodon/src/main/res/values-de-rDE/strings_sk.xml @@ -415,4 +415,5 @@ Standard-Sichtbarkeit für Posts Neue Follower_innen manuell genehmigen Start-Timeline geleert + Befreundet \ 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 aa2a893d0..5717077c7 100644 --- a/mastodon/src/main/res/values/strings_sk.xml +++ b/mastodon/src/main/res/values/strings_sk.xml @@ -416,4 +416,5 @@ Cleared home timeline cache Manually approve new followers Default posting visibility + Mutuals \ No newline at end of file diff --git a/mastodon/src/main/res/values/styles.xml b/mastodon/src/main/res/values/styles.xml index 71a64a49f..0c5454714 100644 --- a/mastodon/src/main/res/values/styles.xml +++ b/mastodon/src/main/res/values/styles.xml @@ -224,6 +224,9 @@ +