Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/src-tauri/src/account/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ impl AccountStore {
let auth = ms_mc_login(&self.client, &self.handle).await?;
let profile = get_profile_info(&self.client, &auth.mc_token).await?;

let mut active_changed = false;
if self.active.is_empty() {
active_changed = true;
self.active = profile.id.clone();
}

Expand All @@ -180,6 +182,9 @@ impl AccountStore {
self.save()?;

update_data(&self.handle, UpdateType::Accounts);
if active_changed {
update_data(&self.handle, UpdateType::AccountActive);
}
Ok(())
}

Expand Down
2 changes: 1 addition & 1 deletion app/src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ pub fn run() {
}
#[cfg(not(debug_assertions))]
if url.scheme() == "http" || url.scheme() == "https" {
let url = Url::parse("tauri://localhost").unwrap();
let url = Url::parse("tauri://localhost/home").unwrap();
settings.url = Some(url.clone());
let _ = view.navigate(url);

Expand Down
Loading