Always check for store show

This commit is contained in:
crschnick 2024-08-31 11:33:11 +00:00
parent c7d38843da
commit 9c435c55f4
2 changed files with 13 additions and 11 deletions

View file

@ -70,12 +70,10 @@ public class StoreEntryListOverviewComp extends SimpleComp {
.equals(rootCategory);
// Sadly the all binding does not update when the individual visibility of entries changes
// But it is good enough.
var showProvider =
!storeEntryWrapper.getEntry().getValidity().isUsable()
|| storeEntryWrapper
.getEntry()
.getProvider()
.shouldShow(storeEntryWrapper);
var showProvider = true;
try {
showProvider = storeEntryWrapper.getEntry().getProvider().shouldShow(storeEntryWrapper);
} catch (Exception ignored) {}
return inRootCategory && showProvider;
},
StoreViewState.get().getActiveCategory());

View file

@ -169,11 +169,15 @@ public class StoreSection {
// .orElse(false);
// is children. This check is fast as the children are cached in the storage
return DataStorage.get().getStoreChildren(e.getEntry()).contains(other.getEntry())
&&
// show provider
(!other.getEntry().getValidity().isUsable()
|| other.getEntry().getProvider().shouldShow(other));
if (!DataStorage.get().getStoreChildren(e.getEntry()).contains(other.getEntry())) {
return false;
}
var showProvider = true;
try {
showProvider = other.getEntry().getProvider().shouldShow(other);
} catch (Exception ignored) {}
return showProvider;
},
e.getPersistentState(),
e.getCache(),