Skip to content

Commit

Permalink
'#1629: delete last item clicked/viewed on analysis UI
Browse files Browse the repository at this point in the history
  • Loading branch information
lfcnassif committed Apr 13, 2023
1 parent a1f8c15 commit 55fd18a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions iped-app/src/main/java/iped/app/ui/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,8 @@ private void destroy() {
app = null;
}

FileProcessor.disposeLastItem();

} catch (Exception e) {
e.printStackTrace();
}
Expand Down
6 changes: 6 additions & 0 deletions iped-app/src/main/java/iped/app/ui/FileProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ public class FileProcessor extends CancelableWorker<Void, Void> implements IFile
private boolean listRelated;
private static volatile IItem lastItem;

public static final void disposeLastItem() {
if (lastItem != null) {
lastItem.dispose();
}
}

public FileProcessor(int docId, boolean listRelated) {
this.listRelated = listRelated;
this.docId = docId;
Expand Down

0 comments on commit 55fd18a

Please sign in to comment.