Fix intro show condition

This commit is contained in:
crschnick 2024-08-28 23:11:16 +00:00
parent 3a700643f0
commit 6cc0771974

View file

@ -36,16 +36,16 @@ public class StoreEntryListComp extends SimpleComp {
var initialCount = 1; var initialCount = 1;
var showIntro = Bindings.createBooleanBinding( var showIntro = Bindings.createBooleanBinding(
() -> { () -> {
var all = StoreViewState.get().getAllConnectionsCategory(); var allCat = StoreViewState.get().getAllConnectionsCategory();
var connections = StoreViewState.get().getAllEntries().getList().stream() var connections = StoreViewState.get().getAllEntries().getList().stream()
.filter(wrapper -> all.contains(wrapper)) .filter(wrapper -> allCat.equals(wrapper.getCategory().getValue().getRoot()))
.toList(); .toList();
return initialCount == connections.size() return initialCount == connections.size()
&& StoreViewState.get() && StoreViewState.get()
.getActiveCategory() .getActiveCategory()
.getValue() .getValue()
.getRoot() .getRoot()
.equals(StoreViewState.get().getAllConnectionsCategory()); .equals(allCat);
}, },
StoreViewState.get().getAllEntries().getList(), StoreViewState.get().getAllEntries().getList(),
StoreViewState.get().getActiveCategory()); StoreViewState.get().getActiveCategory());