mirror of https://github.com/M66B/FairEmail.git
Hide pro texts when applicable
This commit is contained in:
parent
27b89de1f5
commit
96be1c9bf6
|
@ -806,16 +806,20 @@ public class Helper {
|
|||
}
|
||||
|
||||
static void linkPro(final TextView tv) {
|
||||
final Intent pro = new Intent(Intent.ACTION_VIEW, Uri.parse(BuildConfig.PRO_FEATURES_URI));
|
||||
PackageManager pm = tv.getContext().getPackageManager();
|
||||
if (pro.resolveActivity(pm) != null) {
|
||||
tv.getPaint().setUnderlineText(true);
|
||||
tv.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
tv.getContext().startActivity(pro);
|
||||
}
|
||||
});
|
||||
if (isPro(tv.getContext()))
|
||||
hide(tv);
|
||||
else {
|
||||
final Intent pro = new Intent(Intent.ACTION_VIEW, Uri.parse(BuildConfig.PRO_FEATURES_URI));
|
||||
PackageManager pm = tv.getContext().getPackageManager();
|
||||
if (pro.resolveActivity(pm) != null) {
|
||||
tv.getPaint().setUnderlineText(true);
|
||||
tv.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
tv.getContext().startActivity(pro);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue