From 6c2df3468895486e8fc033aea8f3d65015922977 Mon Sep 17 00:00:00 2001 From: tehcneko <7764726+tehcneko@users.noreply.github.com> Date: Wed, 10 Feb 2021 15:33:51 +0800 Subject: [PATCH] [app] Fix empty info item --- .../lsposed/manager/ui/activity/RepoItemActivity.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/github/lsposed/manager/ui/activity/RepoItemActivity.java b/app/src/main/java/io/github/lsposed/manager/ui/activity/RepoItemActivity.java index 6716773f..5595ed9a 100644 --- a/app/src/main/java/io/github/lsposed/manager/ui/activity/RepoItemActivity.java +++ b/app/src/main/java/io/github/lsposed/manager/ui/activity/RepoItemActivity.java @@ -24,6 +24,7 @@ import android.os.Build; import android.os.Bundle; import android.text.Spannable; import android.text.SpannableStringBuilder; +import android.text.TextUtils; import android.text.style.ClickableSpan; import android.text.util.Linkify; import android.view.Menu; @@ -145,13 +146,13 @@ public class RepoItemActivity extends BaseActivity { public InformationAdapter(OnlineModule module) { this.module = module; - if (module.getHomepageUrl() != null) { + if (!TextUtils.isEmpty(module.getHomepageUrl())) { homepageRow = rowCount++; } - if (module.getCollaborators() != null) { + if (module.getCollaborators() != null && !module.getCollaborators().isEmpty()) { collaboratorsRow = rowCount++; } - if (module.getSourceUrl() != null) { + if (!TextUtils.isEmpty(module.getSourceUrl())) { sourceUrlRow = rowCount++; } }