Skip to content

Commit cf72bc8

Browse files
committed
update
1 parent 76d45f4 commit cf72bc8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/WorldListPage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ private void installWorld(Path zipFile) {
159159
Controllers.prompt(i18n("world.name.enter"), (name, resolve, reject) -> {
160160
Task.runAsync(() -> world.install(savesDir, name))
161161
.whenComplete(Schedulers.javafx(), () -> {
162-
itemsProperty().add(new World(savesDir.resolve(name)));
163162
resolve.run();
163+
refresh();
164164
}, e -> {
165165
if (e instanceof FileAlreadyExistsException)
166166
reject.accept(i18n("world.import.failed", i18n("world.import.already_exists")));
@@ -185,7 +185,7 @@ public void export(World world) {
185185
}
186186

187187
public void delete(World world) {
188-
WorldManageUIUtils.delete(world, () -> this.getItems().remove(world));
188+
WorldManageUIUtils.delete(world, this::refresh);
189189
}
190190

191191
public void copy(World world) {

0 commit comments

Comments
 (0)