mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-01-04 22:47:38 +00:00
Add CacheModule display string to title
This commit is contained in:
parent
40e92721c1
commit
1468dfd6b6
@ -93,8 +93,15 @@ public class ReposAdapter extends RecyclerView.Adapter<ReposAdapter.ViewHolder>
|
|||||||
|
|
||||||
private void SetupViewElements() {
|
private void SetupViewElements() {
|
||||||
int mPosition = mHolder.getAdapterPosition();
|
int mPosition = mHolder.getAdapterPosition();
|
||||||
|
String titleString;
|
||||||
if (repo.getId() != null) {
|
if (repo.getId() != null) {
|
||||||
mHolder.title.setText(repo.getName());
|
if (repo.isCacheModule()) {
|
||||||
|
titleString = "[Cache] " + repo.getName();
|
||||||
|
} else {
|
||||||
|
titleString = repo.getName();
|
||||||
|
}
|
||||||
|
|
||||||
|
mHolder.title.setText(titleString);
|
||||||
mHolder.versionName.setText(repo.getmVersion());
|
mHolder.versionName.setText(repo.getmVersion());
|
||||||
mHolder.description.setText(repo.getDescription());
|
mHolder.description.setText(repo.getDescription());
|
||||||
String authorString = this.context.getResources().getString(R.string.author) + " " + repo.getmAuthor();
|
String authorString = this.context.getResources().getString(R.string.author) + " " + repo.getmAuthor();
|
||||||
|
@ -31,7 +31,7 @@ public class Repo {
|
|||||||
private String mDonateUrl;
|
private String mDonateUrl;
|
||||||
private String lastUpdate;
|
private String lastUpdate;
|
||||||
private Context appContext;
|
private Context appContext;
|
||||||
private boolean mIsInstalled,mCanUpdate;
|
private boolean mIsInstalled,mCanUpdate,mIsCacheModule;
|
||||||
|
|
||||||
|
|
||||||
public Repo(String manifestString, Context context) {
|
public Repo(String manifestString, Context context) {
|
||||||
@ -133,6 +133,9 @@ public class Repo {
|
|||||||
case "donate":
|
case "donate":
|
||||||
this.mDonateUrl = props[1];
|
this.mDonateUrl = props[1];
|
||||||
break;
|
break;
|
||||||
|
case "cacheModule":
|
||||||
|
this.mIsCacheModule = Boolean.valueOf(props[1]);
|
||||||
|
break;
|
||||||
case "support":
|
case "support":
|
||||||
this.mSupportUrl = props[1];
|
this.mSupportUrl = props[1];
|
||||||
break;
|
break;
|
||||||
@ -261,5 +264,6 @@ public class Repo {
|
|||||||
|
|
||||||
public boolean isInstalled() { return mIsInstalled; }
|
public boolean isInstalled() { return mIsInstalled; }
|
||||||
public boolean canUpdate() { return mCanUpdate; }
|
public boolean canUpdate() { return mCanUpdate; }
|
||||||
|
public boolean isCacheModule() { return mIsCacheModule; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user