Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e55e9dc9 authored by hoffc's avatar hoffc Committed by SongFerng Wang
Browse files

Fix UI flashing after changing network mode

DashboardFragment will dynamically control every preference's visibility according to preference's availability status, but EID and IMEI preference controllers have incorrect visibility control logic when these two preferences are inavailable, which leads to confliction with DashboardFragment's visibility control logic.

Remove EID and IMEI preferences's visibility settings from their controllers.

Bug: 335369817
Test: the author has tested.
Flag: EXEMPT bugfix
Change-Id: I572f9de07ff3fb8b39294d4b54b04a40a26a78ab
parent af053aa3
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -91,7 +91,6 @@ open class MobileNetworkEidPreferenceController(context: Context, key: String) :
            )
            return
        }
        preference.isVisible = false

        val viewModel by lazyViewModel
        coroutineScope = viewLifecycleOwner.lifecycleScope
@@ -127,7 +126,6 @@ open class MobileNetworkEidPreferenceController(context: Context, key: String) :
        preference.title = title
        preference.dialogTitle = title
        preference.summary = eid
        preference.isVisible = eid.isNotEmpty()
    }

    override fun handlePreferenceTreeClick(preference: Preference): Boolean {
+0 −1
Original line number Diff line number Diff line
@@ -113,7 +113,6 @@ class MobileNetworkImeiPreferenceController(context: Context, key: String) :
    private fun refreshUi(){
        preference.title = title
        preference.summary = imei
        preference.isVisible = true
    }

    override fun handlePreferenceTreeClick(preference: Preference): Boolean {