Add previous, next, and open to preview

This commit is contained in:
Jeremy Soller 2024-09-23 11:59:05 -06:00
parent bdd3450614
commit 60009324c8
No known key found for this signature in database
GPG key ID: D02FD439211AF56F
3 changed files with 85 additions and 36 deletions

View file

@ -393,13 +393,13 @@ impl App {
let mut children = Vec::with_capacity(1);
match kind {
PreviewKind::Custom(PreviewItem(item)) => {
children.push(item.property_view(IconSizes::default()));
children.push(item.preview_view(IconSizes::default()));
}
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.property_view(self.tab.config.icon_sizes));
children.push(item.preview_view(self.tab.config.icon_sizes));
// Only show one property view to avoid issues like hangs when generating
// preview images on thousands of files
break;
@ -411,7 +411,7 @@ impl App {
if let Some(items) = self.tab.items_opt() {
for item in items.iter() {
if item.selected {
children.push(item.property_view(self.tab.config.icon_sizes));
children.push(item.preview_view(self.tab.config.icon_sizes));
// Only show one property view to avoid issues like hangs when generating
// preview images on thousands of files
break;