mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-04-27 16:09:58 -07:00
minor fixes
This commit is contained in:
@@ -133,7 +133,7 @@ async fn update_ui(task_tracker: &TaskTracker, config: &config::Config, mut ui_
|
||||
task_tracker.spawn_blocking(move || {
|
||||
let mut fb: Framebuffer = Framebuffer::new();
|
||||
// this feels wrong, is there a more rusty way to do this?
|
||||
let img: Option<&[u8]> = None;
|
||||
let mut img: Option<&[u8]> = None;
|
||||
if display_level == 2 {
|
||||
img = Some(IMAGE_DIR.get_file("orca.gif").expect("failed to read orca.gif").contents());
|
||||
} else if display_level == 3 {
|
||||
@@ -150,9 +150,6 @@ async fn update_ui(task_tracker: &TaskTracker, config: &config::Config, mut ui_
|
||||
|
||||
}
|
||||
match display_level {
|
||||
1 | _ => {
|
||||
fb.draw_line(framebuffer::Color565::Green, 2);
|
||||
},
|
||||
2 => {
|
||||
fb.draw_gif(img.unwrap());
|
||||
},
|
||||
@@ -166,6 +163,9 @@ async fn update_ui(task_tracker: &TaskTracker, config: &config::Config, mut ui_
|
||||
fb.draw_line(framebuffer::Color565::Pink, 50);
|
||||
fb.draw_line(framebuffer::Color565::Cyan, 25);
|
||||
},
|
||||
1 | _ => {
|
||||
fb.draw_line(framebuffer::Color565::Green, 2);
|
||||
},
|
||||
};
|
||||
sleep(Duration::from_millis(100));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user