Skip to content

Commit

Permalink
fix weird login issues
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDavenport committed Apr 14, 2024
1 parent 645ce22 commit 8589801
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gamercade_app/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,11 @@ impl App {
self.auth_state = new_state;

match self.auth_state {
AuthState::Unauthorized => self.modes.arcade.logged_in(),
AuthState::SessionHeld(_) => self.modes.arcade.logged_out(),
AuthState::Unauthorized => self.modes.arcade.logged_out(),
AuthState::SessionHeld(_) => self.modes.arcade.logged_in(),
}
}
TaskNotification::LoginFailed => self.modes.arcade.logged_out(),
}
}
}
Expand Down
1 change: 1 addition & 0 deletions gamercade_app/src/task_manager/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ async fn handle_login(
}
}
Err(e) => {
sender.send(TaskNotification::LoginFailed).await.unwrap();
println!("{e}");
}
}
Expand Down
1 change: 1 addition & 0 deletions gamercade_app/src/task_manager/super_task_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pub enum TaskNotification {
GlobalTags(Vec<(TagId, Tag)>),
GlobalPermissionLevels(Vec<(PermissionLevelId, PermissionLevel)>),
AuthStateChanged(AuthState),
LoginFailed,
}

pub struct SuperTaskManager {
Expand Down

0 comments on commit 8589801

Please sign in to comment.