Skip to content

Commit

Permalink
More migration log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
QuantumBadger committed Jun 8, 2020
1 parent 72bc3c5 commit 958eb24
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,12 @@ && getIntent().getAction().equals(Intent.ACTION_MAIN)) {

final int appVersion = pInfo.versionCode;

Log.i(TAG, "[Migration] App version: " + appVersion);

if(!sharedPreferences.contains("firstRunMessageShown")) {

Log.i(TAG, "[Migration] Showing first run message");

new AlertDialog.Builder(this)
.setTitle(R.string.firstrun_login_title)
.setMessage(R.string.firstrun_login_message)
Expand All @@ -189,6 +193,8 @@ public void onClick(final DialogInterface dialog, final int which) {

final int lastVersion = sharedPreferences.getInt("lastVersion", 0);

Log.i(TAG, "[Migration] Last version: " + lastVersion);

if(lastVersion < 63) {
// Upgrading across the 1.9.0 boundary (when oAuth was introduced)

Expand Down Expand Up @@ -434,6 +440,7 @@ public void run() {
}

} else {
Log.i(TAG, "[Migration] Last version not set.");
sharedPreferences.edit().putInt("lastVersion", appVersion).apply();
ChangelogDialog.newInstance().show(getSupportFragmentManager(), null);
}
Expand Down

0 comments on commit 958eb24

Please sign in to comment.