Add thumbnailing

This commit is contained in:
Jeremy Soller 2024-02-22 16:17:39 -07:00
parent f38ce15bf9
commit 9905af8f6f
No known key found for this signature in database
GPG key ID: D02FD439211AF56F
5 changed files with 166 additions and 43 deletions

View file

@ -359,6 +359,9 @@ impl App {
for item in items.iter() {
if item.selected {
children.push(item.property_view(&self.core, tab.config.icon_sizes));
// Only show one property view to avoid issues like hangs when generating
// preview images on thousands of files
break;
}
}
}
@ -1158,6 +1161,16 @@ impl Application for App {
));
}
for entity in self.tab_model.iter() {
if let Some(tab) = self.tab_model.data::<Tab>(entity) {
subscriptions.push(
tab.subscription()
.with(entity)
.map(|(entity, tab_msg)| Message::TabMessage(Some(entity), tab_msg)),
);
}
}
Subscription::batch(subscriptions)
}
}