parent
38829f4c00
commit
e34dcf1372
4 changed files with 125 additions and 64 deletions
|
|
@ -472,16 +472,17 @@ impl App {
|
|||
}
|
||||
|
||||
fn preview<'a>(&'a self, kind: &'a PreviewKind) -> Element<'a, tab::Message> {
|
||||
let military_time = self.tab.config.military_time;
|
||||
let mut children = Vec::with_capacity(1);
|
||||
match kind {
|
||||
PreviewKind::Custom(PreviewItem(item)) => {
|
||||
children.push(item.preview_view(None, IconSizes::default()));
|
||||
children.push(item.preview_view(None, IconSizes::default(), military_time));
|
||||
}
|
||||
PreviewKind::Location(location) => {
|
||||
if let Some(items) = self.tab.items_opt() {
|
||||
for item in items.iter() {
|
||||
if item.location_opt.as_ref() == Some(location) {
|
||||
children.push(item.preview_view(None, self.tab.config.icon_sizes));
|
||||
children.push(item.preview_view(None, self.tab.config.icon_sizes, military_time));
|
||||
// Only show one property view to avoid issues like hangs when generating
|
||||
// preview images on thousands of files
|
||||
break;
|
||||
|
|
@ -493,7 +494,7 @@ impl App {
|
|||
if let Some(items) = self.tab.items_opt() {
|
||||
for item in items.iter() {
|
||||
if item.selected {
|
||||
children.push(item.preview_view(None, self.tab.config.icon_sizes));
|
||||
children.push(item.preview_view(None, self.tab.config.icon_sizes, military_time));
|
||||
// Only show one property view to avoid issues like hangs when generating
|
||||
// preview images on thousands of files
|
||||
break;
|
||||
|
|
@ -501,7 +502,7 @@ impl App {
|
|||
}
|
||||
if children.is_empty() {
|
||||
if let Some(item) = &self.tab.parent_item_opt {
|
||||
children.push(item.preview_view(None, self.tab.config.icon_sizes));
|
||||
children.push(item.preview_view(None, self.tab.config.icon_sizes, military_time));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue