1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2024-12-11 16:16:48 +01:00

fix: ignore approval required servers from list when sign up

This commit is contained in:
CMK 2021-08-04 15:17:04 +08:00
parent 0ee2dea581
commit 7165ca5b38

View File

@ -55,7 +55,13 @@ extension MastodonPickServerViewModel.LoadIndexedServerState {
} receiveValue: { [weak self] response in
guard let _ = self else { return }
stateMachine.enter(Idle.self)
viewModel.indexedServers.value = response.value
// ignore approval required servers
var servers = response.value
if viewModel.mode == .signUp {
servers = servers.filter { !$0.approvalRequired }
}
viewModel.indexedServers.value = servers
}
.store(in: &viewModel.disposeBag)
}