Hide pro texts when applicable

This commit is contained in:
M66B 2019-07-13 11:42:42 +02:00
parent 27b89de1f5
commit 96be1c9bf6
1 changed files with 14 additions and 10 deletions

View File

@ -806,6 +806,9 @@ public class Helper {
} }
static void linkPro(final TextView tv) { static void linkPro(final TextView tv) {
if (isPro(tv.getContext()))
hide(tv);
else {
final Intent pro = new Intent(Intent.ACTION_VIEW, Uri.parse(BuildConfig.PRO_FEATURES_URI)); final Intent pro = new Intent(Intent.ACTION_VIEW, Uri.parse(BuildConfig.PRO_FEATURES_URI));
PackageManager pm = tv.getContext().getPackageManager(); PackageManager pm = tv.getContext().getPackageManager();
if (pro.resolveActivity(pm) != null) { if (pro.resolveActivity(pm) != null) {
@ -818,6 +821,7 @@ public class Helper {
}); });
} }
} }
}
static <T> List<List<T>> chunkList(List<T> list, int size) { static <T> List<List<T>> chunkList(List<T> list, int size) {
List<List<T>> result = new ArrayList<>(list.size() / size); List<List<T>> result = new ArrayList<>(list.size() / size);