Skip to content

Commit

Permalink
NOJ - DO not lock() widgets every second (#152)
Browse files Browse the repository at this point in the history
Co-authored-by: Romain Gallet <[email protected]>
  • Loading branch information
gr211 and gr211 authored Jul 21, 2024
1 parent 4ac4183 commit 465cbe7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,11 @@ impl MainWindow {
let widgets = self.accounts_window.widgets.clone();

let tick = move || {
let seconds = chrono::Local::now().second() as u8;
let seconds = Local::now().second() as u8;

AccountsWindow::progress_bar_fraction_for(&progress_bar, seconds as u32);
let mut widgets = widgets.lock().unwrap();
if seconds == 0 || seconds == 30 {
let mut widgets = widgets.lock().unwrap();
widgets.iter_mut().for_each(|group| group.update());
}

Expand Down

0 comments on commit 465cbe7

Please sign in to comment.