Skip to content

Commit 92f14e0

Browse files
committed
Show item instantly when added
1 parent 73cfac6 commit 92f14e0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/src/main/java/com/rappytv/toolwarn/ui/ToolConfigActivity.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,11 @@ private DivWidget initializeManageContainer(ToolWidget toolWidget) {
258258

259259
doneButton.setEnabled(true);
260260
doneButton.setPressable(() -> {
261+
if(!this.toolWidgets.contains(toolWidget)) {
262+
this.toolWidgets.add(toolWidget);
263+
this.toolList.session().setSelectedEntry(toolWidget);
264+
}
265+
261266
WarnTool tool = toolWidget.getTool();
262267
tool.setType(typeDropdown.getSelected());
263268
tool.setWarnAt(sliderValue);
@@ -271,7 +276,6 @@ private DivWidget initializeManageContainer(ToolWidget toolWidget) {
271276

272277
toolWidget.setTool(tool);
273278
this.setAction(null);
274-
reload();
275279
});
276280

277281
buttonList.addEntry(doneButton);

0 commit comments

Comments
 (0)