From 49cd05ee35f0f7a27b765c23beeee9728ac79759 Mon Sep 17 00:00:00 2001 From: Zekovski <> Date: Tue, 15 Aug 2023 12:44:30 +0200 Subject: [PATCH 1/3] Misnamed variable --- .../ui/fragment/settings/FragmentThemingSettings.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentThemingSettings.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentThemingSettings.java index a25df4b2..d6403e64 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentThemingSettings.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentThemingSettings.java @@ -141,8 +141,8 @@ public class FragmentThemingSettings extends PreferenceFragmentCompat implements SET_CUSTOM_ACCENT_DARK_VALUE.setColor(darkValue); } if (SET_CUSTOM_ACCENT_LIGHT_VALUE != null) { - int darkValue = sharedpreferences.getInt(getString(R.string.SET_CUSTOM_ACCENT_LIGHT_VALUE) + currentUserID + currentInstance, -1); - SET_CUSTOM_ACCENT_LIGHT_VALUE.setColor(darkValue); + int lightValue = sharedpreferences.getInt(getString(R.string.SET_CUSTOM_ACCENT_LIGHT_VALUE) + currentUserID + currentInstance, -1); + SET_CUSTOM_ACCENT_LIGHT_VALUE.setColor(lightValue); } } From ed9563d380a235ed120ecbb11042eeb6b47e9c6f Mon Sep 17 00:00:00 2001 From: Zekovski <> Date: Tue, 15 Aug 2023 13:00:26 +0200 Subject: [PATCH 2/3] Replaced SDK version check with isDynamicColorAvailable before showing DynamicColors options. --- .../settings/FragmentThemingSettings.java | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentThemingSettings.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentThemingSettings.java index d6403e64..a38c15ac 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentThemingSettings.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/settings/FragmentThemingSettings.java @@ -31,6 +31,7 @@ import androidx.preference.PreferenceFragmentCompat; import androidx.preference.PreferenceManager; import androidx.preference.SwitchPreferenceCompat; +import com.google.android.material.color.DynamicColors; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.jaredrummler.android.colorpicker.ColorPreferenceCompat; @@ -118,20 +119,7 @@ public class FragmentThemingSettings extends PreferenceFragmentCompat implements SwitchPreferenceCompat SET_CUSTOM_ACCENT = findPreference(getString(R.string.SET_CUSTOM_ACCENT)); ColorPreferenceCompat SET_CUSTOM_ACCENT_DARK_VALUE = findPreference(getString(R.string.SET_CUSTOM_ACCENT_DARK_VALUE)); ColorPreferenceCompat SET_CUSTOM_ACCENT_LIGHT_VALUE = findPreference(getString(R.string.SET_CUSTOM_ACCENT_LIGHT_VALUE)); - if (android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.S) { - if (SET_DYNAMIC_COLOR != null) { - getPreferenceScreen().removePreference(SET_DYNAMIC_COLOR); - } - if (SET_CUSTOM_ACCENT != null) { - getPreferenceScreen().removePreference(SET_CUSTOM_ACCENT); - } - if (SET_CUSTOM_ACCENT_DARK_VALUE != null) { - getPreferenceScreen().removePreference(SET_CUSTOM_ACCENT_DARK_VALUE); - } - if (SET_CUSTOM_ACCENT_LIGHT_VALUE != null) { - getPreferenceScreen().removePreference(SET_CUSTOM_ACCENT_LIGHT_VALUE); - } - } else { + if (DynamicColors.isDynamicColorAvailable()) { if (SET_CUSTOM_ACCENT != null) { boolean customAccentEnabled = sharedpreferences.getBoolean(getString(R.string.SET_CUSTOM_ACCENT) + currentUserID + currentInstance, false); SET_CUSTOM_ACCENT.setChecked(customAccentEnabled); @@ -144,6 +132,19 @@ public class FragmentThemingSettings extends PreferenceFragmentCompat implements int lightValue = sharedpreferences.getInt(getString(R.string.SET_CUSTOM_ACCENT_LIGHT_VALUE) + currentUserID + currentInstance, -1); SET_CUSTOM_ACCENT_LIGHT_VALUE.setColor(lightValue); } + } else { + if (SET_DYNAMIC_COLOR != null) { + getPreferenceScreen().removePreference(SET_DYNAMIC_COLOR); + } + if (SET_CUSTOM_ACCENT != null) { + getPreferenceScreen().removePreference(SET_CUSTOM_ACCENT); + } + if (SET_CUSTOM_ACCENT_DARK_VALUE != null) { + getPreferenceScreen().removePreference(SET_CUSTOM_ACCENT_DARK_VALUE); + } + if (SET_CUSTOM_ACCENT_LIGHT_VALUE != null) { + getPreferenceScreen().removePreference(SET_CUSTOM_ACCENT_LIGHT_VALUE); + } } Preference SET_CUSTOMIZE_LIGHT_COLORS_ACTION = findPreference(getString(R.string.SET_CUSTOMIZE_LIGHT_COLORS_ACTION)); From 6805c214bc1be0a6bd12e8dca8b2f0f48e36ed44 Mon Sep 17 00:00:00 2001 From: Gaute Holmin Date: Tue, 22 Aug 2023 20:48:34 +0200 Subject: [PATCH 3/3] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegian?= =?UTF-8?q?=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 6.9% (3 of 43 strings) Co-authored-by: Gaute Holmin Translate-URL: https://hosted.weblate.org/projects/fedilab/description/nb_NO/ Translation: Fedilab/description --- src/fdroid/fastlane/metadata/android/no/title.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/fdroid/fastlane/metadata/android/no/title.txt diff --git a/src/fdroid/fastlane/metadata/android/no/title.txt b/src/fdroid/fastlane/metadata/android/no/title.txt new file mode 100644 index 00000000..e6f369e8 --- /dev/null +++ b/src/fdroid/fastlane/metadata/android/no/title.txt @@ -0,0 +1 @@ +Fedilab