Skip to content

Commit

Permalink
Add Cmd/ctrl+R to refresh view (#580)
Browse files Browse the repository at this point in the history
* Add Cmd/ctrl+R to refresh view

* Linting
  • Loading branch information
jacksongoode authored Feb 5, 2025
1 parent 5730800 commit a679897
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions psst-gui/src/controller/nav.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use crate::{
ui::{album, artist, library, lyrics, playlist, recommend, search, show},
};
use druid::widget::{prelude::*, Controller};
use druid::Code;

pub struct NavController;

Expand Down Expand Up @@ -115,6 +116,11 @@ where
ctx.set_handled();
self.load_route_data(ctx, data);
}
Event::KeyDown(key) if key.mods.meta() && key.code == Code::KeyR => {
data.refresh();
ctx.set_handled();
self.load_route_data(ctx, data);
}
_ => {
child.event(ctx, event, data, env);
}
Expand Down

0 comments on commit a679897

Please # to comment.