fix: reload app on account switch

This commit is contained in:
Rongjian Zhang
2020-02-01 14:44:15 +08:00
parent 7c7dc32db6
commit 084aec4453
3 changed files with 13 additions and 8 deletions

View File

@@ -237,7 +237,10 @@ class AuthModel with ChangeNotifier {
super.dispose();
}
void setActiveAccountIndex(int index) {
var rootKey = UniqueKey();
void setActiveAccountAndReload(int index) {
// https://stackoverflow.com/a/50116077
rootKey = UniqueKey();
activeAccountIndex = index;
_gqlClient = null;
notifyListeners();