|
|
@ -31,6 +31,8 @@ import java.util.concurrent.Executor;
|
|
|
|
import java.util.concurrent.atomic.AtomicBoolean;
|
|
|
|
import java.util.concurrent.atomic.AtomicBoolean;
|
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import eu.faircode.email.EntityLog;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* A LiveData implementation that closely works with {@link InvalidationTracker} to implement
|
|
|
|
* A LiveData implementation that closely works with {@link InvalidationTracker} to implement
|
|
|
|
* database drive {@link androidx.lifecycle.LiveData} queries that are strongly hold as long
|
|
|
|
* database drive {@link androidx.lifecycle.LiveData} queries that are strongly hold as long
|
|
|
@ -114,8 +116,8 @@ class RoomTrackingLiveData<T> extends LiveData<T> {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void run() {
|
|
|
|
public void run() {
|
|
|
|
if (running.get() == 0 && queued.get() > 0) {
|
|
|
|
if (running.get() == 0 && queued.get() > 0) {
|
|
|
|
eu.faircode.email.Log.i(mComputeFunction +
|
|
|
|
eu.faircode.email.Log.persist(EntityLog.Type.Debug,
|
|
|
|
" running=" + running + " queued=" + queued);
|
|
|
|
mComputeFunction + " running=" + running + " queued=" + queued);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
boolean isActive = hasActiveObservers();
|
|
|
|
boolean isActive = hasActiveObservers();
|
|
|
|