mirror of
https://github.com/Xithrius/twitch-tui.git
synced 2024-09-11 13:45:30 +03:00
Scrolling now fully works.
Infinite scrolling backwards no longer happens. Closes #115
This commit is contained in:
parent
4f33bfb35c
commit
2e15c7b184
@ -141,7 +141,7 @@ pub async fn ui_driver(
|
||||
match app.state {
|
||||
State::MessageInput | State::MessageSearch | State::Normal => match key {
|
||||
Key::ScrollUp => {
|
||||
if app.scroll_offset < usize::MAX {
|
||||
if app.scroll_offset < app.messages.len() {
|
||||
app.scroll_offset += 1;
|
||||
}
|
||||
}
|
||||
|
@ -85,7 +85,9 @@ pub fn draw_ui<T: Backend>(frame: &mut Frame<T>, app: &mut App, config: &Complet
|
||||
if app.filters.contaminated(msg) {
|
||||
continue;
|
||||
}
|
||||
} else if scroll_offset > 0 {
|
||||
}
|
||||
|
||||
if scroll_offset > 0 {
|
||||
scroll_offset -= 1;
|
||||
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user