don't disable App info > Battery usage item while its summary is loading
This commit is contained in:
@@ -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 ->
|
||||
|
||||
Reference in New Issue
Block a user