Skip to content

Commit

Permalink
Merge pull request #123 from matheuswhite/116-scroll-bug
Browse files Browse the repository at this point in the history
Fix scroll bug which jumps to start when scrolled up
  • Loading branch information
matheuswhite authored Nov 15, 2024
2 parents 007483f + 4a031e4 commit 7230c6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
9 changes: 4 additions & 5 deletions src/graphics/graphics_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,10 @@ impl GraphicsTask {
blink_color: Color,
) {
private.last_frame_height = frame.size().height;
let scroll = if private.auto_scroll {
(Self::max_main_axis(&private), private.scroll.1)
} else {
private.scroll
};
if private.auto_scroll {
private.scroll.0 = Self::max_main_axis(&private);
}
let scroll = private.scroll;

let (coll, coll_size) = (
private.history.range(scroll.0 as usize..).filter(|msg| {
Expand Down
5 changes: 1 addition & 4 deletions src/plugin/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,7 @@ impl PluginEngine {
continue 'plugin_engine_loop;
}

let Ok(filepath) = PathBuf::from_str(&filepath) else {
error!(private.logger, "Invalid filepath {}", filepath);
continue 'plugin_engine_loop;
};
let Ok(filepath) = PathBuf::from_str(&filepath);

let plugin_name = Arc::new(plugin_name);

Expand Down

0 comments on commit 7230c6b

Please sign in to comment.