refactor: Use is_multiple_of for the tick counter in the UI module

This commit is contained in:
2025-12-09 14:30:17 -07:00
parent b51e42b4b2
commit c3fa689617
17 changed files with 20 additions and 20 deletions
+2 -2
View File
@@ -246,7 +246,7 @@ fn draw_movie_history(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
movie_history_item.source_title.scroll_left_or_reset(
get_width_from_percentage(area, 34),
current_selection == *movie_history_item,
app.tick_count % app.ticks_until_scroll == 0,
app.tick_count.is_multiple_of(app.ticks_until_scroll),
);
Row::new(vec![
@@ -398,7 +398,7 @@ fn draw_movie_releases(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
get_width_from_percentage(area, 30),
current_selection == *release
&& current_route != ActiveRadarrBlock::ManualSearchConfirmPrompt.into(),
app.tick_count % app.ticks_until_scroll == 0,
app.tick_count.is_multiple_of(app.ticks_until_scroll),
);
let size = convert_to_gb(*size);
let rejected_str = if *rejected { "" } else { "" };