feat: Improved UI speed and responsiveness
Check / stable / fmt (push) Has been cancelled
Check / beta / clippy (push) Has been cancelled
Check / stable / clippy (push) Has been cancelled
Check / nightly / doc (push) Has been cancelled
Check / 1.89.0 / check (push) Has been cancelled
Test Suite / ubuntu / beta (push) Has been cancelled
Test Suite / ubuntu / stable (push) Has been cancelled
Test Suite / macos-latest / stable (push) Has been cancelled
Test Suite / windows-latest / stable (push) Has been cancelled
Test Suite / ubuntu / stable / coverage (push) Has been cancelled

This commit is contained in:
2025-12-19 13:41:14 -07:00
parent 6a9fd0999c
commit 368f7505ff
21 changed files with 64 additions and 28 deletions
+10
View File
@@ -39,6 +39,7 @@ pub struct App<'a> {
pub tick_until_poll: u64,
pub ticks_until_scroll: u64,
pub tick_count: u64,
pub ui_scroll_tick_count: u64,
pub is_routing: bool,
pub is_loading: bool,
pub should_refresh: bool,
@@ -145,6 +146,14 @@ impl App<'_> {
self.tick_count = 0;
}
pub fn on_ui_scroll_tick(&mut self) {
if self.ui_scroll_tick_count == self.ticks_until_scroll {
self.ui_scroll_tick_count = 0;
} else {
self.ui_scroll_tick_count += 1;
}
}
#[allow(dead_code)]
pub fn reset(&mut self) {
self.reset_tick_count();
@@ -227,6 +236,7 @@ impl Default for App<'_> {
tick_until_poll: 400,
ticks_until_scroll: 4,
tick_count: 0,
ui_scroll_tick_count: 0,
is_loading: false,
is_routing: false,
should_refresh: false,