refactor: do not include cache in message
We already have access to the cache in the `update` arguments.
This commit is contained in:
parent
665c527dd0
commit
130d004e79
@ -19,7 +19,7 @@ use crate::{
|
||||
pub enum Message {
|
||||
Tick,
|
||||
UpdateCache(Result<Cache, Error>),
|
||||
UpdatePanelCache(/* is current panel */ bool, Result<Cache, Error>),
|
||||
UpdatePanelCache(/* is current panel */ bool),
|
||||
View(view::Message),
|
||||
LoadDaemonConfig(Box<DaemonConfig>),
|
||||
DaemonConfigLoaded(Result<(), Error>),
|
||||
|
||||
@ -327,7 +327,7 @@ impl App {
|
||||
panel.update(
|
||||
daemon.clone(),
|
||||
&cache,
|
||||
Message::UpdatePanelCache(current == menu, Ok(cache.clone())),
|
||||
Message::UpdatePanelCache(current == menu),
|
||||
)
|
||||
})
|
||||
.collect();
|
||||
|
||||
@ -254,7 +254,7 @@ impl State for Home {
|
||||
}
|
||||
}
|
||||
},
|
||||
Message::UpdatePanelCache(is_current, Ok(cache)) => {
|
||||
Message::UpdatePanelCache(is_current) => {
|
||||
let wallet_was_syncing = !self.sync_status.is_synced();
|
||||
self.sync_status = sync_status(
|
||||
daemon.backend(),
|
||||
|
||||
@ -136,7 +136,7 @@ impl State for BitcoindSettingsState {
|
||||
self.rescan_settings.past_possible_height = true;
|
||||
self.rescan_settings.processing = false;
|
||||
}
|
||||
Message::UpdatePanelCache(_, Ok(_)) => {
|
||||
Message::UpdatePanelCache(_) => {
|
||||
self.rescan_settings.processing = cache.rescan_progress.is_some_and(|p| p < 1.0);
|
||||
}
|
||||
Message::View(view::Message::Settings(view::SettingsMessage::BitcoindSettings(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user