simplify code

This commit is contained in:
6543 2020-03-29 16:02:33 +02:00
parent 667d98329c
commit 25c6a9558f

View File

@ -299,24 +299,12 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
Log.e("changelogDialog", Objects.requireNonNull(e.getMessage())); Log.e("changelogDialog", Objects.requireNonNull(e.getMessage()));
} }
if (!tinyDb.getBoolean("versionFlag")) { if (versionCode > tinyDb.getInt("versionCode")) {
if (versionCode > tinyDb.getInt("versionCode")) { tinyDb.putInt("versionCode", versionCode);
tinyDb.putInt("versionCode", versionCode); tinyDb.putBoolean("versionFlag", true);
tinyDb.putBoolean("versionFlag", true);
}
else {
tinyDb.putBoolean("versionFlag", false);
}
}
else {
tinyDb.putBoolean("versionFlag", false);
}
if(tinyDb.getBoolean("versionFlag")) {
ChangeLog changelogDialog = new ChangeLog(this); ChangeLog changelogDialog = new ChangeLog(this);
changelogDialog.showDialog(); changelogDialog.showDialog();
} }
} }
public void setActionBarTitle (@NonNull String title) { public void setActionBarTitle (@NonNull String title) {