Small fixes

This commit is contained in:
crschnick
2026-09-24 12:50:23 +00:00
parent f9c8e884b4
commit f886619c09
3 changed files with 9 additions and 7 deletions
@@ -796,6 +796,14 @@ public class StoreViewState {
.orElseThrow();
}
public StoreCategoryWrapper getCategoryWrapper(UUID uuid) {
return categories.getList().stream()
.filter(storeCategoryWrapper ->
storeCategoryWrapper.getCategory().getUuid().equals(uuid))
.findFirst()
.orElseThrow();
}
public StoreCategoryWrapper getCategoryWrapper(DataStoreCategory entry) {
return categories.getList().stream()
.filter(storeCategoryWrapper ->
@@ -45,7 +45,7 @@ public class AppPrefsStorageHandler {
content = (ObjectNode) read;
}
}
} catch (IOException e) {
} catch (Exception e) {
ErrorEventFactory.fromThrowable(e)
.expected()
.description("Settings file " + file + " is corrupt")
@@ -579,9 +579,6 @@ public abstract class DataStorage {
});
categoriesToMove.forEach(toMove -> {
toMove.setParentCategory(breakOut.getUuid());
// The update mechanism does not support moves, so readd them
listeners.forEach(storageListener -> storageListener.onCategoryRemove(toMove));
listeners.forEach(storageListener -> storageListener.onCategoryAdd(toMove));
});
listeners.forEach(storageListener -> storageListener.onCategoryListUpdate());
@@ -633,9 +630,6 @@ public abstract class DataStorage {
});
moveCategories.forEach(toMove -> {
toMove.setParentCategory(parent.get().getCategoryUuid());
// The update mechanism does not support moves, so readd them
listeners.forEach(storageListener -> storageListener.onCategoryRemove(toMove));
listeners.forEach(storageListener -> storageListener.onCategoryAdd(toMove));
});
entry.setCategoryUuid(parent.get().getCategoryUuid());