mirror of https://github.com/M66B/FairEmail.git
Simplification
This commit is contained in:
parent
e35cbf2c90
commit
337db180f0
|
@ -268,11 +268,10 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
|
|||
}
|
||||
|
||||
void cancel(Context context) {
|
||||
if (future != null)
|
||||
if (future.cancel(false)) {
|
||||
Log.i("Cancelled task=" + name);
|
||||
cleanup(context);
|
||||
}
|
||||
if (future != null && future.cancel(false)) {
|
||||
Log.i("Cancelled task=" + name);
|
||||
cleanup(context);
|
||||
}
|
||||
}
|
||||
|
||||
private void cleanup(Context context) {
|
||||
|
|
Loading…
Reference in New Issue