fix: set rescan processing to false upon completion

Otherwise, the button gets stuck on "Starting rescan...".
This commit is contained in:
Michael Mallan 2025-01-10 16:57:45 +00:00
parent 65e002dc52
commit 665c527dd0
No known key found for this signature in database
GPG Key ID: 5177CDCEDB0EABEB
2 changed files with 7 additions and 1 deletions

View File

@ -317,7 +317,10 @@ impl App {
let current = &self.panels.current;
let daemon = self.daemon.clone();
// These are the panels to update with the cache.
let mut panels = [(&mut self.panels.home as &mut dyn State, Menu::Home)];
let mut panels = [
(&mut self.panels.home as &mut dyn State, Menu::Home),
(&mut self.panels.settings as &mut dyn State, Menu::Settings),
];
let commands: Vec<_> = panels
.iter_mut()
.map(|(panel, menu)| {

View File

@ -136,6 +136,9 @@ impl State for BitcoindSettingsState {
self.rescan_settings.past_possible_height = true;
self.rescan_settings.processing = false;
}
Message::UpdatePanelCache(_, Ok(_)) => {
self.rescan_settings.processing = cache.rescan_progress.is_some_and(|p| p < 1.0);
}
Message::View(view::Message::Settings(view::SettingsMessage::BitcoindSettings(
msg,
))) => {