Improved revision handling

pull/206/head
M66B 3 years ago
parent 2ef084d9ee
commit 9d7a82e612

@ -2,7 +2,7 @@
### [Yaverlandia](https://en.wikipedia.org/wiki/Yaverlandia)
### 1.1726-b
### 1.1726b
* Following dark/light theme for original message view
* Added message menu item / optional button to force light theme for original message view

@ -4,6 +4,7 @@ apply plugin: 'kotlin-android'
apply plugin: 'de.undercouch.download'
def getVersionCode = { -> return 1726 }
def getRevision = { -> "\"b\"" }
def getReleaseName = { -> return "\"Yaverlandia\"" }
// https://en.wikipedia.org/wiki/List_of_dinosaur_genera
@ -133,7 +134,7 @@ android {
productFlavors {
github {
dimension "all"
buildConfigField "String", "REVISION", "\"b\""
buildConfigField "String", "REVISION", getRevision()
buildConfigField "boolean", "BETA_RELEASE", "true"
buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
buildConfigField "boolean", "AMAZON_RELEASE", "false"
@ -144,7 +145,7 @@ android {
}
fdroid {
dimension "all"
buildConfigField "String", "REVISION", "\"a\""
buildConfigField "String", "REVISION", getRevision()
buildConfigField "boolean", "BETA_RELEASE", "true"
buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
buildConfigField "boolean", "AMAZON_RELEASE", "false"
@ -156,7 +157,7 @@ android {
play {
dimension "all"
//minSdkVersion 23
buildConfigField "String", "REVISION", "\"a\""
buildConfigField "String", "REVISION", getRevision()
buildConfigField "boolean", "BETA_RELEASE", "true"
buildConfigField "boolean", "PLAY_STORE_RELEASE", "true"
buildConfigField "boolean", "AMAZON_RELEASE", "false"

@ -2,7 +2,7 @@
### [Yaverlandia](https://en.wikipedia.org/wiki/Yaverlandia)
### 1.1726-b
### 1.1726b
* Following dark/light theme for original message view
* Added message menu item / optional button to force light theme for original message view

@ -1103,14 +1103,14 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
}
private void checkFirst() {
String current = BuildConfig.VERSION_NAME + "-" + BuildConfig.REVISION;
String version = BuildConfig.VERSION_NAME + BuildConfig.REVISION;
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
if (prefs.getBoolean("first", true))
new FragmentDialogFirst().show(getSupportFragmentManager(), "first");
else if (!BuildConfig.PLAY_STORE_RELEASE) {
String last = prefs.getString("changelog", null);
if (!Objects.equals(current, last)) {
if (!Objects.equals(version, last)) {
Bundle args = new Bundle();
args.putString("name", "CHANGELOG.md");
FragmentDialogMarkdown fragment = new FragmentDialogMarkdown();
@ -1119,7 +1119,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
}
}
prefs.edit().putString("changelog", current).apply();
prefs.edit().putString("changelog", version).apply();
}
private void checkBanner() {

@ -61,7 +61,8 @@ public class FragmentAbout extends FragmentBase {
TextView tvGplV3 = view.findViewById(R.id.tvGplV3);
LinearLayout llContributors = view.findViewById(R.id.llContributors);
tvVersion.setText(getString(R.string.title_version, BuildConfig.VERSION_NAME));
String version = BuildConfig.VERSION_NAME + BuildConfig.REVISION;
tvVersion.setText(getString(R.string.title_version, version));
tvRelease.setText(BuildConfig.RELEASE_NAME);
long last = 0;

Loading…
Cancel
Save