mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-09-30 04:15:52 +00:00
Small fixes
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user