mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 02:07:42 +00:00
Merge pull request #1209 from APriestman/incorrectThumbnails
Clear out Image Gallery thumbnail cache to prevent images from closed cases from being re-used.
This commit is contained in:
commit
d9d7217c14
@ -348,6 +348,7 @@ public final class ImageGalleryController {
|
||||
LOGGER.info("resetting ImageGalleryControler to initial state.");
|
||||
selectionModel.clearSelection();
|
||||
setListeningEnabled(false);
|
||||
ThumbnailCache.getDefault().clearCache();
|
||||
Platform.runLater(() -> {
|
||||
historyManager.clear();
|
||||
});
|
||||
|
@ -83,6 +83,13 @@ public enum ThumbnailCache {
|
||||
/** thread that saves generated thumbnails to disk for use later */
|
||||
private final Executor imageSaver = Executors.newSingleThreadExecutor(new BasicThreadFactory.Builder().namingPattern("icon saver-%d").build());
|
||||
|
||||
/**
|
||||
* Clear out the cache between cases
|
||||
*/
|
||||
public final void clearCache() {
|
||||
cache.invalidateAll();
|
||||
}
|
||||
|
||||
/** get the cached thumbnail for the given file or generate a new one if
|
||||
* needed
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user