mirror of https://github.com/M66B/FairEmail.git
Delay delivering task data
This commit is contained in:
parent
aded278004
commit
6934feda1a
|
@ -122,7 +122,7 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
|
||||||
if (state.equals(Lifecycle.State.DESTROYED)) {
|
if (state.equals(Lifecycle.State.DESTROYED)) {
|
||||||
// No delivery
|
// No delivery
|
||||||
cleanup(context);
|
cleanup(context);
|
||||||
} else if (state.isAtLeast(Lifecycle.State.STARTED)) {
|
} else if (state.isAtLeast(Lifecycle.State.RESUMED)) {
|
||||||
// Inline delivery
|
// Inline delivery
|
||||||
Log.i("Deliver task " + name);
|
Log.i("Deliver task " + name);
|
||||||
deliver();
|
deliver();
|
||||||
|
@ -136,7 +136,7 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
|
||||||
Log.i("Destroyed task " + name);
|
Log.i("Destroyed task " + name);
|
||||||
owner.getLifecycle().removeObserver(this);
|
owner.getLifecycle().removeObserver(this);
|
||||||
cleanup(context);
|
cleanup(context);
|
||||||
} else if (state.isAtLeast(Lifecycle.State.STARTED)) {
|
} else if (state.isAtLeast(Lifecycle.State.RESUMED)) {
|
||||||
Log.i("Deferred delivery task " + name);
|
Log.i("Deferred delivery task " + name);
|
||||||
owner.getLifecycle().removeObserver(this);
|
owner.getLifecycle().removeObserver(this);
|
||||||
deliver();
|
deliver();
|
||||||
|
|
Loading…
Reference in New Issue