From 9c435c55f4a8112fd7342b990d1b369f3b380c5f Mon Sep 17 00:00:00 2001 From: crschnick Date: Sat, 31 Aug 2024 11:33:11 +0000 Subject: [PATCH] Always check for store show --- .../app/comp/store/StoreEntryListOverviewComp.java | 10 ++++------ .../java/io/xpipe/app/comp/store/StoreSection.java | 14 +++++++++----- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListOverviewComp.java b/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListOverviewComp.java index 294be06dc..62440566c 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListOverviewComp.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreEntryListOverviewComp.java @@ -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()); diff --git a/app/src/main/java/io/xpipe/app/comp/store/StoreSection.java b/app/src/main/java/io/xpipe/app/comp/store/StoreSection.java index 6ac344721..8c244d783 100644 --- a/app/src/main/java/io/xpipe/app/comp/store/StoreSection.java +++ b/app/src/main/java/io/xpipe/app/comp/store/StoreSection.java @@ -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(),