Skip to content

Commit

Permalink
fix: unexpected crash when unfold menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Mairon1206 committed Oct 14, 2024
1 parent 00a7c53 commit 85d03b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Controller/View/MenuOverlay.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <Infrastructure/Network/ResponseStruct.h>
#include <Infrastructure/Utils/Tools.h>
#include <chrono>
#include <slint.h>

EVENTO_UI_START

Expand Down Expand Up @@ -53,7 +54,7 @@ Task<Result<slint::Image>> MenuOverlay::loadUserInfoTask() {
}
co_return Ok(slint::Image::load_from_path(slint::SharedString(avatar.unwrap().u8string())));
}
refreshUserInfo(userInfo);
slint::blocking_invoke_from_event_loop([&] { refreshUserInfo(userInfo); });
bridge.getAccountManager().userInfo() = std::move(userInfo);
co_return Err(Error(Error::Data, "User avatar not found"));
}
Expand Down

0 comments on commit 85d03b0

Please sign in to comment.