From cf756c2282f7ede23fa4b8ff9f2cfbdc41aee0fa Mon Sep 17 00:00:00 2001 From: "Matheus T. dos Santos" Date: Sun, 29 Sep 2024 19:37:55 -0300 Subject: [PATCH 1/2] fix: fix scroll bug which jumps to start when scrolled up --- src/graphics/graphics_task.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/graphics/graphics_task.rs b/src/graphics/graphics_task.rs index 46d0013..d319c44 100644 --- a/src/graphics/graphics_task.rs +++ b/src/graphics/graphics_task.rs @@ -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| { From 4a031e401088ef4dc2df0b181ec5dc8b43224b70 Mon Sep 17 00:00:00 2001 From: "Matheus T. dos Santos" Date: Fri, 15 Nov 2024 14:35:15 -0300 Subject: [PATCH 2/2] fix: remove unrefutable pattern --- src/plugin/engine.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/plugin/engine.rs b/src/plugin/engine.rs index 8548dab..3dad91f 100644 --- a/src/plugin/engine.rs +++ b/src/plugin/engine.rs @@ -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);