Workaround to support favorited files
This commit is contained in:
parent
76a95820a4
commit
8ba70f2f93
2 changed files with 14 additions and 2 deletions
|
|
@ -148,7 +148,7 @@ impl MenuAction for Action {
|
|||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
enum ContextItem {
|
||||
pub enum ContextItem {
|
||||
NavBar(segmented_button::Entity),
|
||||
TabBar(segmented_button::Entity),
|
||||
}
|
||||
|
|
|
|||
14
src/tab.rs
14
src/tab.rs
|
|
@ -1218,7 +1218,19 @@ impl Tab {
|
|||
}
|
||||
}
|
||||
Message::Location(location) => {
|
||||
cd = Some(location);
|
||||
// Workaround to support favorited files
|
||||
match &location {
|
||||
Location::Path(path) => {
|
||||
if path.is_dir() {
|
||||
cd = Some(location);
|
||||
} else {
|
||||
commands.push(Command::OpenFile(path.clone()));
|
||||
}
|
||||
}
|
||||
Location::Trash => {
|
||||
cd = Some(location);
|
||||
}
|
||||
}
|
||||
}
|
||||
Message::LocationUp => {
|
||||
// Sets location to the path's parent
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue