fix logOut failing, add invoking logOut before id server change

This commit is contained in:
csf
2022-12-16 23:18:30 +09:00
parent 9d2364b307
commit 3e8c1c46b6
3 changed files with 19 additions and 10 deletions

View File

@@ -932,6 +932,10 @@ class _NetworkState extends State<_Network> with AutomaticKeepAliveClientMixin {
return false;
}
}
final old = await bind.mainGetOption(key: 'custom-rendezvous-server');
if (old.isNotEmpty && old != idServer) {
await gFFI.userModel.logOut();
}
// should set one by one
await bind.mainSetOption(
key: 'custom-rendezvous-server', value: idServer);