Fix issue where search filtering broke

We accidentally deleted a }
kari/search
kari-ts 1 year ago
parent 502eada21a
commit 4e4f27331c

@ -102,8 +102,7 @@ class MainViewModel(private val vpnViewModel: VpnViewModel) : IpnViewModel() {
when { when {
prepared && currentState == State.Running || currentState == State.Starting -> prepared && currentState == State.Running || currentState == State.Starting ->
true true
previousState == State.NoState && currentState == State.Starting -> previousState == State.NoState && currentState == State.Starting -> true
true
else -> false else -> false
} }
@ -131,6 +130,7 @@ class MainViewModel(private val vpnViewModel: VpnViewModel) : IpnViewModel() {
} }
} }
} }
}
viewModelScope.launch { viewModelScope.launch {
searchTerm.collect { term -> peers.set(peerCategorizer.groupedAndFilteredPeers(term)) } searchTerm.collect { term -> peers.set(peerCategorizer.groupedAndFilteredPeers(term)) }
@ -140,7 +140,6 @@ class MainViewModel(private val vpnViewModel: VpnViewModel) : IpnViewModel() {
App.get().healthNotifier?.currentIcon?.collect { icon -> healthIcon.set(icon) } App.get().healthNotifier?.currentIcon?.collect { icon -> healthIcon.set(icon) }
} }
} }
}
fun showVPNPermissionLauncherIfUnauthorized() { fun showVPNPermissionLauncherIfUnauthorized() {
val vpnIntent = VpnService.prepare(App.get()) val vpnIntent = VpnService.prepare(App.get())

Loading…
Cancel
Save