Merge pull request #5874 from APriestman/6333_changeTimelineEventHandling

6333 Don't load data sources for TIMELINE_EVENT_ADDED
This commit is contained in:
Richard Cordovano 2020-05-06 17:40:56 -04:00 committed by GitHub
commit d95cd23546
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View File

@ -658,6 +658,17 @@ public final class EventsModel {
return postTagsDeleted(updatedEventIDs);
}
/**
* Updates the events model for a data source added event.
*
* @throws TskCoreException If there is an error reading model data from the
* case database.
*/
synchronized void handleDataSourceAdded() throws TskCoreException {
populateDataSourcesCache();
invalidateCaches(null);
}
/**
* Updates the events model for an artifact tag deleted event and publishes
* a tag deleted event via the model's event bus.
@ -782,7 +793,6 @@ public final class EventsModel {
* @throws TskCoreException
*/
public synchronized void invalidateCaches(Collection<Long> updatedEventIDs) throws TskCoreException {
populateDataSourcesCache();
minEventTimeCache.invalidateAll();
maxEventTimeCache.invalidateAll();
idsToEventsCache.invalidateAll(emptyIfNull(updatedEventIDs));

View File

@ -783,7 +783,7 @@ public class TimeLineController {
break;
case DATA_SOURCE_ADDED:
future = executor.submit(() -> {
filteredEvents.invalidateCaches(null);
filteredEvents.handleDataSourceAdded();
return null;
});
break;