From e23f59e8af59eb451aea6e5ee70d4c933233cf0c Mon Sep 17 00:00:00 2001 From: Jaida Wu Date: Fri, 21 Jul 2023 16:29:54 +0800 Subject: [PATCH] Fix empty modules list tip display Signed-off-by: Jaida Wu --- .../main/java/mobi/meow/android/gootool/ModulesFragment.java | 2 +- .../java/mobi/meow/android/gootool/adapter/ModulesAdapter.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/mobi/meow/android/gootool/ModulesFragment.java b/app/src/main/java/mobi/meow/android/gootool/ModulesFragment.java index f6d9d5b..a8c672d 100644 --- a/app/src/main/java/mobi/meow/android/gootool/ModulesFragment.java +++ b/app/src/main/java/mobi/meow/android/gootool/ModulesFragment.java @@ -163,7 +163,7 @@ private void setButtonsEnabled(boolean value) { } private void setModuleViewListVisible() { - boolean value = WorldOfGoo.getAvailableAddins().size() != 0; + boolean value = modListAdapter.getCount() != 0; modsGrid.setVisibility(value ? View.VISIBLE : View.GONE); list_empty_tip.setVisibility(value ? View.GONE : View.VISIBLE); } diff --git a/app/src/main/java/mobi/meow/android/gootool/adapter/ModulesAdapter.java b/app/src/main/java/mobi/meow/android/gootool/adapter/ModulesAdapter.java index a91280f..0f97c5d 100644 --- a/app/src/main/java/mobi/meow/android/gootool/adapter/ModulesAdapter.java +++ b/app/src/main/java/mobi/meow/android/gootool/adapter/ModulesAdapter.java @@ -23,6 +23,7 @@ public class ModulesAdapter extends RecyclerView.Adapter { private final Context mContext; + public ArrayList list = new ArrayList<>(); private boolean removeMode = false;