mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 06:38:29 +02:00
Fixed last activity edge cases
This commit is contained in:
@@ -265,6 +265,11 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
|
||||
|
||||
visible = true;
|
||||
|
||||
if (!(this instanceof ActivityMain)) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
prefs.edit().putString("last_activity", this.getClass().getName()).apply();
|
||||
}
|
||||
|
||||
boolean contacts = hasPermission(Manifest.permission.READ_CONTACTS);
|
||||
if (this.contacts != contacts &&
|
||||
!this.getClass().equals(ActivitySetup.class) &&
|
||||
@@ -282,8 +287,6 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
|
||||
super.onPause();
|
||||
|
||||
visible = false;
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
prefs.edit().putString("last_activity", this.getClass().getName()).apply();
|
||||
|
||||
checkAuthentication(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user