don't disable App info > Battery usage item while its summary is loading

This commit is contained in:
Dmitry Muhomor
2024-12-29 18:29:15 +02:00
committed by Joey
parent 04e3fba5e2
commit 60a5d2906a

View File

@@ -57,7 +57,6 @@ fun AppBatteryPreference(app: ApplicationInfo) {
Preference(object : PreferenceModel {
override val title = stringResource(R.string.battery_details_title)
override val summary = presenter.summary
override val enabled = presenter.enabled
override val onClick = presenter::startActivity
})
@@ -97,8 +96,6 @@ private class AppBatteryPresenter(private val context: Context, private val app:
Pair(batteryDiffEntry.await(), optimizationMode)
}
val enabled = { batteryDiffEntryState is LoadingState.Done }
val summary = {
if (app.installed) {
batteryDiffEntryState.let { batteryDiffEntryState ->