diff --git a/app/src/main/java/com/topjohnwu/magisk/adapters/ModulesAdapter.java b/app/src/main/java/com/topjohnwu/magisk/adapters/ModulesAdapter.java index 8f315808d..b3a35b6df 100644 --- a/app/src/main/java/com/topjohnwu/magisk/adapters/ModulesAdapter.java +++ b/app/src/main/java/com/topjohnwu/magisk/adapters/ModulesAdapter.java @@ -3,6 +3,7 @@ package com.topjohnwu.magisk.adapters; import android.content.Context; import android.support.design.widget.Snackbar; import android.support.v7.widget.RecyclerView; +import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -41,18 +42,10 @@ public class ModulesAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/com/topjohnwu/magisk/adapters/ReposAdapter.java b/app/src/main/java/com/topjohnwu/magisk/adapters/ReposAdapter.java index d05e26f65..5405dc8ef 100644 --- a/app/src/main/java/com/topjohnwu/magisk/adapters/ReposAdapter.java +++ b/app/src/main/java/com/topjohnwu/magisk/adapters/ReposAdapter.java @@ -52,18 +52,10 @@ public class ReposAdapter extends RecyclerView.Adapter Repo repo = getItem(position); holder.title.setText(repo.getName()); + holder.versionName.setText(repo.getVersion()); String author = repo.getAuthor(); - String versionName = repo.getVersion(); - String description = repo.getDescription(); - if (versionName != null) { - holder.versionName.setText(versionName); - } - if (author != null) { - holder.author.setText(context.getString(R.string.author, author)); - } - if (description != null) { - holder.description.setText(description); - } + holder.author.setText(TextUtils.isEmpty(author) ? null : context.getString(R.string.author, author)); + holder.description.setText(repo.getDescription()); holder.setExpanded(expandList.contains(repo));