mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Small improvement
This commit is contained in:
parent
af2b5a411b
commit
137053a865
1 changed files with 3 additions and 3 deletions
|
@ -154,6 +154,9 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
|
|||
}
|
||||
|
||||
void addBackPressedListener(final IBackPressedListener listener, LifecycleOwner owner) {
|
||||
Log.i("Adding back listener=" + listener);
|
||||
backPressedListeners.add(listener);
|
||||
|
||||
owner.getLifecycle().addObserver(new LifecycleObserver() {
|
||||
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
|
||||
public void onDestroyed() {
|
||||
|
@ -161,9 +164,6 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
|
|||
backPressedListeners.remove(listener);
|
||||
}
|
||||
});
|
||||
|
||||
Log.i("Adding back listener=" + listener);
|
||||
backPressedListeners.add(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue