Revert "Use decoded server list when removing servers"
This reverts commit dcd060e350.
This commit is contained in:
1 parent
d3e1e7c6fe
commit
1c3d247071
1 file changed
+4
-4
@@ -308,11 +308,11 @@ class MainViewModel(application: Application) : AndroidViewModel(application) {
|
||||
if (subscriptionId.isEmpty() && keywordFilter.isEmpty()) {
|
||||
MmkvManager.removeAllServer()
|
||||
} else {
|
||||
val serverList = MmkvManager.decodeServerList(subscriptionId)
|
||||
for (guid in serverList) {
|
||||
MmkvManager.removeServer(guid)
|
||||
val serversCopy = serversCache.toList()
|
||||
for (item in serversCopy) {
|
||||
MmkvManager.removeServer(item.guid)
|
||||
}
|
||||
serverList.count()
|
||||
serversCache.toList().count()
|
||||
}
|
||||
return count
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user