Merge pull request #554 from iamkartiknayak/fix/image-only-gallery

fix(gallery): trigger gallery view only on images
This commit is contained in:
Jeremy Soller 2024-10-03 16:04:02 -06:00 committed by GitHub
commit d3f91e6457
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2030,7 +2030,14 @@ impl Tab {
}
}
Message::GalleryToggle => {
self.gallery = !self.gallery;
if let Some(indices) = self.column_sort() {
for (_, item) in indices.iter() {
if item.selected && item.mime.type_() == mime::IMAGE {
self.gallery = !self.gallery;
break;
}
}
}
}
Message::GoNext => {
if let Some(history_i) = self.history_i.checked_add(1) {