NetworkPreference: Only show microG login switch if supported

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2025-08-21 16:45:16 +08:00
parent 0ff43042a0
commit ef488ff2b4
2 changed files with 2 additions and 1 deletions

View File

@@ -65,7 +65,7 @@ class NetworkPreference : BasePreferenceFragment() {
}
}
findPreference<SwitchPreferenceCompat>(PREFERENCE_MICROG_AUTH)?.isEnabled =
findPreference<SwitchPreferenceCompat>(PREFERENCE_MICROG_AUTH)?.isVisible =
PackageUtil.hasSupportedMicroGVariant(requireContext())
}

View File

@@ -41,6 +41,7 @@
app:defaultValue="true"
app:disableDependentsState="false"
app:iconSpaceReserved="false"
app:isPreferenceVisible="false"
app:key="PREFERENCE_MICROG_AUTH"
app:summary="@string/pref_network_microg_login_desc"
app:title="@string/pref_network_microg_login_title" />