Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Decodetalkers committed Aug 6, 2024
1 parent 1985e2f commit ff79e39
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 42 deletions.
52 changes: 16 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/launcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub struct Launcher {
text: String,
apps: Vec<App>,
scrollpos: usize,
pub shoud_delete: bool,
pub should_delete: bool,
}

impl Launcher {
Expand All @@ -26,7 +26,7 @@ impl Launcher {
text: "".to_string(),
apps: all_apps(),
scrollpos: 0,
shoud_delete: false,
should_delete: false,
}
}

Expand Down Expand Up @@ -57,7 +57,7 @@ impl Launcher {
.find(|(index, _)| *index == self.scrollpos);
if let Some((_, (_, app))) = index {
app.launch();
self.shoud_delete = true;
self.should_delete = true;
Command::single(Action::Window(WindowAction::Close(id)))
} else {
Command::none()
Expand All @@ -70,7 +70,7 @@ impl Launcher {
}
Message::Launch(index) => {
self.apps[index].launch();
self.shoud_delete = true;
self.should_delete = true;
Command::single(Action::Window(WindowAction::Close(id)))
}
Message::IcedEvent(event) => {
Expand Down Expand Up @@ -104,7 +104,7 @@ impl Launcher {
self.scrollpos += 1;
}
keyboard::Key::Named(Named::Escape) => {
self.shoud_delete = true;
self.should_delete = true;
return Command::single(Action::Window(WindowAction::Close(id)));
}
_ => {}
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ impl MultiApplication for LalaMusicBar {
if let Some(launcher) = self.launcher.as_mut() {
if let Some(id) = self.launcherid {
let cmd = launcher.update(message, id);
if launcher.shoud_delete {
if launcher.should_delete {
self.launcher.take();
}
return cmd;
Expand Down

0 comments on commit ff79e39

Please sign in to comment.