Skip to content

Commit

Permalink
fix: Permanetly Delete in a new thread to not block ui
Browse files Browse the repository at this point in the history
Clicking Permanetly Delete can take some time if you delete more then one show.  running that task in a new thread prevents it from blocking ui updates.
  • Loading branch information
lart2150 committed Feb 12, 2024
1 parent 26e1240 commit 6767fcf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/com/tivo/kmttg/gui/remote/deleted.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,13 @@ public void handle(ActionEvent e) {
public void handle(ActionEvent e) {
String tivoName = tivo.getValue();
if (tivoName != null && tivoName.length() > 0) {
tab.permanentlyDelete(tivoName);
Task<Void> task = new Task<Void>() {
@Override public Void call() {
tab.permanentlyDelete(tivoName);
return null;
}
};
new Thread(task).start();
}
}
});
Expand Down

0 comments on commit 6767fcf

Please sign in to comment.