fix: address reviewer feedback — rename scroll field to bool, relocate static, drop env var
- Rename `ui_scroll_tick_count: u64` → `should_text_scroll: bool` across all 33 call sites; `on_ui_scroll_tick` now assigns true/false instead of 0/1 - Remove two now-redundant comments from `test_on_ui_scroll_tick` - Move `WHITESPACE_RE` static declaration below module imports in network/mod.rs - Remove `MANAGARR_TICK_RATE_MS` env var and its parsing helpers; `recv()`-based blocking already brings idle CPU to near-0, and tuning tick rate silently stretches the poll cadence — keep `DEFAULT_TICK_RATE_MS` const only Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C3FpbniZme9mJqgFkMVowz
This commit is contained in:
1 parent
6f697f64f4
commit
645ca19d76
30 files changed
+43
-70
No files matched your search
@@ -88,7 +88,7 @@ fn draw_downloads(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
||||
output_path.as_ref().unwrap().scroll_left_or_reset(
|
||||
get_width_from_percentage(area, 18),
|
||||
current_selection == *download_record,
|
||||
app.ui_scroll_tick_count == 0,
|
||||
app.should_text_scroll,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ fn draw_history_table(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
||||
source_title.scroll_left_or_reset(
|
||||
get_width_from_percentage(area, 50),
|
||||
current_selection == *history_item,
|
||||
app.ui_scroll_tick_count == 0,
|
||||
app.should_text_scroll,
|
||||
);
|
||||
|
||||
Row::new(vec![
|
||||
|
||||
@@ -46,7 +46,7 @@ fn draw_test_all_indexers_test_results(f: &mut Frame<'_>, app: &mut App<'_>, are
|
||||
result.validation_failures.scroll_left_or_reset(
|
||||
get_width_from_percentage(area, 86),
|
||||
*result == current_selection,
|
||||
app.ui_scroll_tick_count == 0,
|
||||
app.should_text_scroll,
|
||||
);
|
||||
let pass_fail = if result.is_valid { "+" } else { "x" };
|
||||
let row = Row::new(vec![
|
||||
|
||||
@@ -112,7 +112,7 @@ fn draw_add_artist_search(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
||||
artist.artist_name.scroll_left_or_reset(
|
||||
get_width_from_percentage(area, 27),
|
||||
*artist == current_selection,
|
||||
app.ui_scroll_tick_count == 0,
|
||||
app.should_text_scroll,
|
||||
);
|
||||
|
||||
Row::new(vec![
|
||||
|
||||
@@ -250,7 +250,7 @@ fn draw_album_history_table(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
||||
source_title.scroll_left_or_reset(
|
||||
get_width_from_percentage(area, 40),
|
||||
current_selection == *history_item,
|
||||
app.ui_scroll_tick_count == 0,
|
||||
app.should_text_scroll,
|
||||
);
|
||||
|
||||
Row::new(vec![
|
||||
@@ -345,7 +345,7 @@ fn draw_album_releases(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
||||
get_width_from_percentage(area, 35),
|
||||
current_selection == *release
|
||||
&& active_lidarr_block != ActiveLidarrBlock::ManualAlbumSearchConfirmPrompt,
|
||||
app.ui_scroll_tick_count == 0,
|
||||
app.should_text_scroll,
|
||||
);
|
||||
let size = convert_to_gb(*size);
|
||||
let rejected_str = if *rejected { "⛔" } else { "" };
|
||||
|
||||
@@ -271,7 +271,7 @@ fn draw_albums_table(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
||||
album.title.scroll_left_or_reset(
|
||||
get_width_from_percentage(area, 33),
|
||||
*album == current_selection,
|
||||
app.ui_scroll_tick_count == 0,
|
||||
app.should_text_scroll,
|
||||
);
|
||||
let monitored = if album.monitored { "🏷" } else { "" };
|
||||
let album_type = album.album_type.clone().unwrap_or_default();
|
||||
@@ -376,7 +376,7 @@ fn draw_artist_history_table(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
||||
source_title.scroll_left_or_reset(
|
||||
get_width_from_percentage(area, 40),
|
||||
current_selection == *history_item,
|
||||
app.ui_scroll_tick_count == 0,
|
||||
app.should_text_scroll,
|
||||
);
|
||||
|
||||
Row::new(vec![
|
||||
@@ -490,7 +490,7 @@ fn draw_artist_releases(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
||||
get_width_from_percentage(area, 35),
|
||||
current_selection == *release
|
||||
&& active_lidarr_block != ActiveLidarrBlock::ManualArtistSearchConfirmPrompt,
|
||||
app.ui_scroll_tick_count == 0,
|
||||
app.should_text_scroll,
|
||||
);
|
||||
let size = convert_to_gb(*size);
|
||||
let rejected_str = if *rejected { "⛔" } else { "" };
|
||||
|
||||
@@ -96,7 +96,7 @@ fn draw_library(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
||||
artist.artist_name.scroll_left_or_reset(
|
||||
get_width_from_percentage(area, 25),
|
||||
*artist == current_selection,
|
||||
app.ui_scroll_tick_count == 0,
|
||||
app.should_text_scroll,
|
||||
);
|
||||
let monitored = if artist.monitored { "🏷" } else { "" };
|
||||
let artist_type = artist.artist_type.clone().unwrap_or_default();
|
||||
|
||||
@@ -158,7 +158,7 @@ fn draw_track_history_table(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
||||
source_title.scroll_left_or_reset(
|
||||
get_width_from_percentage(area, 40),
|
||||
current_selection == *history_item,
|
||||
app.ui_scroll_tick_count == 0,
|
||||
app.should_text_scroll,
|
||||
);
|
||||
|
||||
Row::new(vec![
|
||||
|
||||
Reference in new issue
Block a user