fix(gallery): trigger gallery view only on images

This commit is contained in:
Kartik Nayak 2024-10-04 00:18:27 +05:30
parent dabb3749f0
commit 0a24b1d5cf

View file

@ -2066,7 +2066,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) {