From e98047cd89148061b97851093990353afde166e5 Mon Sep 17 00:00:00 2001 From: WSTxda Date: Sun, 24 Mar 2024 11:28:38 -0300 Subject: [PATCH] Update some things --- .../kotlin/org/microg/gms/ui/AppPreference.kt | 6 +-- .../src/main/res/values-pt-rBR/strings.xml | 2 +- .../core/src/main/res/values/strings.xml | 6 ++- .../src/main/res/values/strings.xml | 1 - .../org/microg/gms/ui/AskPushPermission.java | 2 +- .../ui/PushNotificationAdvancedFragment.kt | 2 +- .../microg/gms/ui/PushNotificationFragment.kt | 2 +- ...{ask_gcm.xml => ask_push_notification.xml} | 38 +++++++++++-------- .../src/main/res/menu/gcm_menu_item.xml | 4 +- .../src/main/res/navigation/nav_settings.xml | 2 +- .../src/main/res/values-pt-rBR/strings.xml | 15 ++++---- .../src/main/res/values/strings.xml | 11 +++--- ...references_push_notification_settings.xml} | 0 13 files changed, 51 insertions(+), 40 deletions(-) rename play-services-core/src/main/res/layout/{ask_gcm.xml => ask_push_notification.xml} (69%) rename play-services-core/src/main/res/xml/{preferences_gcm_advanced.xml => preferences_push_notification_settings.xml} (100%) diff --git a/play-services-base/core/src/main/kotlin/org/microg/gms/ui/AppPreference.kt b/play-services-base/core/src/main/kotlin/org/microg/gms/ui/AppPreference.kt index 01c662c9b8..a34e561412 100644 --- a/play-services-base/core/src/main/kotlin/org/microg/gms/ui/AppPreference.kt +++ b/play-services-base/core/src/main/kotlin/org/microg/gms/ui/AppPreference.kt @@ -98,10 +98,10 @@ abstract class AppPreference : Preference { packageName.contains(".vanced.android") -> context.getString(R.string.vanced) packageName.contains(".revanced.android") -> context.getString(R.string.revanced) packageName.contains(".rvx.android") -> context.getString(R.string.revanced_extended) - packageName.contains(".rve.android") -> context.getString(R.string.revanced_extended) - packageName.contains("anddea.youtube") -> context.getString(R.string.revanced_extended) - packageName.contains("bill.youtube") -> context.getString(R.string.revanced_extended) packageName.contains(".rex.android") -> context.getString(R.string.youtube_advanced) + packageName.contains(".rve.android") -> context.getString(R.string.revanced_extended_rufusin) + packageName.contains("anddea.youtube") -> context.getString(R.string.revanced_extended_anddea) + packageName.contains("bill.youtube") -> context.getString(R.string.revanced_extended_anddea) else -> "" } diff --git a/play-services-base/core/src/main/res/values-pt-rBR/strings.xml b/play-services-base/core/src/main/res/values-pt-rBR/strings.xml index 41f1770428..a3418b3732 100644 --- a/play-services-base/core/src/main/res/values-pt-rBR/strings.xml +++ b/play-services-base/core/src/main/res/values-pt-rBR/strings.xml @@ -8,7 +8,7 @@ %1$s está rodando em segundo plano Exclua o %1$s das otimizações de bateria ou altere as configurações de notificação para ocultar este aviso - Avançado + Configurações Nenhum Ver todos diff --git a/play-services-base/core/src/main/res/values/strings.xml b/play-services-base/core/src/main/res/values/strings.xml index fe6d49aff7..a724c83ebd 100644 --- a/play-services-base/core/src/main/res/values/strings.xml +++ b/play-services-base/core/src/main/res/values/strings.xml @@ -9,7 +9,7 @@ %1$s is running in background Exclude %1$s from battery optimizations or change notification settings to hide this notification - Advanced + Settings None See all @@ -27,6 +27,8 @@ Vanced ReVanced - ReVanced Extended YT Advanced + ReVanced Extended + ReVanced Extended (Anddea) + ReVanced Extended (Rufusin) diff --git a/play-services-core/microg-ui-tools/src/main/res/values/strings.xml b/play-services-core/microg-ui-tools/src/main/res/values/strings.xml index 26ba4deba9..074be1d258 100644 --- a/play-services-core/microg-ui-tools/src/main/res/values/strings.xml +++ b/play-services-core/microg-ui-tools/src/main/res/values/strings.xml @@ -55,5 +55,4 @@ Connection error: Error: - diff --git a/play-services-core/src/main/java/org/microg/gms/ui/AskPushPermission.java b/play-services-core/src/main/java/org/microg/gms/ui/AskPushPermission.java index 32d7fa3d16..6293694d52 100644 --- a/play-services-core/src/main/java/org/microg/gms/ui/AskPushPermission.java +++ b/play-services-core/src/main/java/org/microg/gms/ui/AskPushPermission.java @@ -51,7 +51,7 @@ public void onCreate(Bundle savedInstanceState) { return; } - View gcmView = getLayoutInflater().inflate(R.layout.ask_gcm, null); + View gcmView = getLayoutInflater().inflate(R.layout.ask_push_notification, null); // Create and show the AlertDialog try { diff --git a/play-services-core/src/main/kotlin/org/microg/gms/ui/PushNotificationAdvancedFragment.kt b/play-services-core/src/main/kotlin/org/microg/gms/ui/PushNotificationAdvancedFragment.kt index bbbae06b02..76b7c06d12 100644 --- a/play-services-core/src/main/kotlin/org/microg/gms/ui/PushNotificationAdvancedFragment.kt +++ b/play-services-core/src/main/kotlin/org/microg/gms/ui/PushNotificationAdvancedFragment.kt @@ -25,7 +25,7 @@ class PushNotificationAdvancedFragment : PreferenceFragmentCompat() { private lateinit var networkOther: ListPreference override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { - addPreferencesFromResource(R.xml.preferences_gcm_advanced) + addPreferencesFromResource(R.xml.preferences_push_notification_settings) } override fun onCreate(savedInstanceState: Bundle?) { diff --git a/play-services-core/src/main/kotlin/org/microg/gms/ui/PushNotificationFragment.kt b/play-services-core/src/main/kotlin/org/microg/gms/ui/PushNotificationFragment.kt index 04002059e4..2caa52d135 100644 --- a/play-services-core/src/main/kotlin/org/microg/gms/ui/PushNotificationFragment.kt +++ b/play-services-core/src/main/kotlin/org/microg/gms/ui/PushNotificationFragment.kt @@ -155,7 +155,7 @@ class PushNotificationFragment : PreferenceFragmentCompat() { override fun onOptionsItemSelected(item: MenuItem): Boolean { return when (item.itemId) { - R.id.menu_advanced -> { + R.id.menu_settings -> { findNavController().navigate(R.id.openGcmAdvancedSettings) true } diff --git a/play-services-core/src/main/res/layout/ask_gcm.xml b/play-services-core/src/main/res/layout/ask_push_notification.xml similarity index 69% rename from play-services-core/src/main/res/layout/ask_gcm.xml rename to play-services-core/src/main/res/layout/ask_push_notification.xml index f9e95fa172..dc4552444f 100644 --- a/play-services-core/src/main/res/layout/ask_gcm.xml +++ b/play-services-core/src/main/res/layout/ask_push_notification.xml @@ -59,23 +59,31 @@ android:layout_marginBottom="18dp" android:divider="?attr/dividerHorizontal" android:orientation="vertical" - android:paddingLeft="20dp" - android:paddingRight="20dp"> + android:paddingStart="26dp" + android:paddingEnd="26dp"> - - + + +