Skip to content

Commit 7959c36

Browse files
authored
fix: Selected patch count (#2559)
1 parent e9542c6 commit 7959c36

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/src/main/java/app/revanced/manager/ui/viewmodel/SelectedAppInfoViewModel.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class SelectedAppInfoViewModel(
131131
viewModelScope.launch {
132132
if (!persistConfiguration) return@launch // TODO: save options for patched apps.
133133

134-
state.value = withContext(Dispatchers.Default) {
134+
options = withContext(Dispatchers.Default) {
135135
val bundlePatches = bundleRepository.bundles.first()
136136
.mapValues { (_, bundle) -> bundle.patches.associateBy { it.name } }
137137

@@ -143,7 +143,7 @@ class SelectedAppInfoViewModel(
143143
}
144144
private set
145145

146-
private var selectionState by savedStateHandle.saveable {
146+
private var selectionState: SelectionState by savedStateHandle.saveable {
147147
if (input.patches != null)
148148
return@saveable mutableStateOf(SelectionState.Customized(input.patches))
149149

@@ -155,7 +155,7 @@ class SelectedAppInfoViewModel(
155155

156156
val previous = selectionRepository.getSelection(packageName)
157157
if (previous.values.sumOf { it.size } == 0) return@launch
158-
selection.value = SelectionState.Customized(previous)
158+
selectionState = SelectionState.Customized(previous)
159159
}
160160

161161
selection

0 commit comments

Comments
 (0)