diff --git a/client/src/main/java/ctbrec/ui/ThumbOverviewTab.java b/client/src/main/java/ctbrec/ui/ThumbOverviewTab.java index 7a2bec7f..426f9982 100644 --- a/client/src/main/java/ctbrec/ui/ThumbOverviewTab.java +++ b/client/src/main/java/ctbrec/ui/ThumbOverviewTab.java @@ -444,6 +444,9 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener { MenuItem ignore = new MenuItem("Ignore"); ignore.setOnAction(e -> ignore(getSelectedThumbCells(cell))); + MenuItem refresh = new MenuItem("Refresh"); + refresh.setOnAction(e -> refresh()); + MenuItem copyUrl = createCopyUrlMenuItem(cell); MenuItem sendTip = createTipMenuItem(cell); @@ -465,7 +468,7 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener { if(site.supportsTips()) { contextMenu.getItems().add(sendTip); } - contextMenu.getItems().addAll(copyUrl, ignore); + contextMenu.getItems().addAll(copyUrl, refresh); if(cell.getModel() instanceof MyFreeCamsModel && Objects.equals(System.getenv("CTBREC_DEV"), "1")) { MenuItem debug = new MenuItem("debug"); debug.setOnAction(e -> MyFreeCamsClient.getInstance().getSessionState(cell.getModel())); @@ -474,6 +477,14 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener { return contextMenu; } + private void refresh() { + if (updateService.isRunning()) { + updateService.cancel(); + updateService.reset(); + updateService.restart(); + } + } + /* check, if other cells are selected, too. in that case, we have to disable menu items, which make sense only for * single selections. but only do that, if the popup has been triggered on a selected cell. otherwise remove the * selection and show the normal menu