Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename balance update method #22

Merged
merged 1 commit into from
May 15, 2024
Merged
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
6 changes: 3 additions & 3 deletions src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ impl HarborCore {
.unwrap();
}

// TODO: probably just do this in core_loaded?
async fn set_balance(&self) {
// Sends updates to the UI to refelect the initial state
async fn init_ui_state(&self) {
self.msg(CoreUIMsg::BalanceUpdated(self.balance)).await;
}

Expand Down Expand Up @@ -294,7 +294,7 @@ pub fn run_core() -> Subscription<Message> {

async fn process_core(core_handle: &mut bridge::CoreHandle, core: &HarborCore) {
// Initialize the ui's state
core.set_balance().await;
core.init_ui_state().await;

loop {
let msg = core_handle.recv().await;
Expand Down