Introduce Pro version for play store (#708)
Introduce Pro version for play store Co-authored-by: M M Arif <mmarif@swatian.com> Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/708
This commit is contained in:
parent
d51d2d5164
commit
4031c32fc8
3
.gitignore
vendored
3
.gitignore
vendored
@ -11,6 +11,9 @@
|
||||
# Release dir
|
||||
app/release/*
|
||||
|
||||
# Pro dir
|
||||
app/pro/*
|
||||
|
||||
# Files for the ART/Dalvik VM
|
||||
*.dex
|
||||
|
||||
|
@ -8,8 +8,21 @@ android {
|
||||
targetSdkVersion 30
|
||||
versionCode 317
|
||||
versionName "3.2.0-dev"
|
||||
multiDexEnabled true
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
dexOptions {
|
||||
javaMaxHeapSize "4g"
|
||||
}
|
||||
flavorDimensions "default"
|
||||
productFlavors {
|
||||
free {
|
||||
applicationId "org.mian.gitnex"
|
||||
}
|
||||
pro {
|
||||
applicationId "org.mian.gitnex.pro"
|
||||
}
|
||||
}
|
||||
buildFeatures {
|
||||
viewBinding = true
|
||||
}
|
||||
|
@ -65,6 +65,14 @@ public class AboutFragment extends Fragment {
|
||||
startActivity(intent);
|
||||
});
|
||||
|
||||
if(AppUtil.isPro(requireContext())) {
|
||||
|
||||
viewBinding.supportHeader.setVisibility(View.GONE);
|
||||
viewBinding.dividerSupport.setVisibility(View.GONE);
|
||||
viewBinding.donationLinkLiberapay.setVisibility(View.GONE);
|
||||
viewBinding.donationLinkPatreon.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
return viewBinding.getRoot();
|
||||
}
|
||||
|
||||
|
@ -76,6 +76,10 @@ public class AppUtil {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isPro(Context context) {
|
||||
return context.getPackageName().equals("org.mian.gitnex.pro");
|
||||
}
|
||||
|
||||
public int charactersLength(String str) {
|
||||
|
||||
return str.length();
|
||||
|
Loading…
x
Reference in New Issue
Block a user