Log out when choosing a different instance

This commit is contained in:
Bnyro 2023-06-28 11:50:08 +02:00
parent dbe9b6e74d
commit 73666c8474
1 changed files with 2 additions and 0 deletions

View File

@ -465,8 +465,10 @@ impl SimpleComponent for App {
} }
let mut current_account = settings::get_current_account(); let mut current_account = settings::get_current_account();
current_account.instance_url = instance_url; current_account.instance_url = instance_url;
current_account.jwt = None;
settings::update_current_account(current_account); settings::update_current_account(current_account);
self.state = AppState::Loading; self.state = AppState::Loading;
self.logged_in = false;
sender.input(AppMsg::StartFetchPosts(None, true)); sender.input(AppMsg::StartFetchPosts(None, true));
} }
AppMsg::ChooseInstance => { AppMsg::ChooseInstance => {