Skip to content

Commit

Permalink
Fixed crash on log out
Browse files Browse the repository at this point in the history
  • Loading branch information
NSGolova committed Apr 16, 2024
1 parent 29211db commit 8497602
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/UI/PreferencesViewController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ void BeatLeader::PreferencesViewController::DidActivate(HMUI::ViewController* se

logoutButton = ::BSML::Lite::CreateUIButton(containerTransform, "Logout", [](){
PlayerController::LogOut();
UpdateUI(nullopt);
});

loginField = ::BSML::Lite::CreateStringSetting(containerTransform, "Login", "", [](StringW value) {
Expand Down Expand Up @@ -198,7 +199,9 @@ void BeatLeader::PreferencesViewController::DidActivate(HMUI::ViewController* se
PlayerController::playerChanged.emplace_back([captureSelf](std::optional<Player> const& updated) {
if (!captureSelf->isActivated) return;
BSML::MainThreadScheduler::Schedule([updated] {
UpdateUI(updated);
if (updated) {
UpdateUI(updated);
}
});
});

Expand Down

0 comments on commit 8497602

Please sign in to comment.