File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
app/src/main/java/at/bitfire/icsdroid/model Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ import dagger.hilt.android.lifecycle.HiltViewModel
2929import dagger.hilt.android.qualifiers.ApplicationContext
3030import kotlinx.coroutines.Dispatchers
3131import kotlinx.coroutines.flow.distinctUntilChanged
32- import kotlinx.coroutines.flow.distinctUntilChangedBy
3332import kotlinx.coroutines.flow.filter
3433import kotlinx.coroutines.launch
3534import kotlinx.coroutines.withContext
@@ -119,7 +118,9 @@ class AddSubscriptionModel @AssistedInject constructor(
119118 viewModelScope.launch {
120119 snapshotFlow { uiState }
121120 // Only react to changes in verificationResult
122- .distinctUntilChangedBy { it.verificationResult.hashCode() }
121+ .distinctUntilChanged { old, new ->
122+ old.verificationResult == new.verificationResult
123+ }
123124 // only react when verificationResult is not null
124125 .filter { it.verificationResult != null }
125126 .collect { state ->
You can’t perform that action at this time.
0 commit comments