mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 21:15:48 +00:00
Fix conversation list not updating with current state.
This commit is contained in:
@@ -2,12 +2,13 @@ package org.thoughtcrime.securesms.jobs;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.WorkerThread;
|
||||
|
||||
import org.signal.core.util.ThreadUtil;
|
||||
import org.thoughtcrime.securesms.database.SignalDatabase;
|
||||
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
|
||||
import org.thoughtcrime.securesms.jobmanager.JsonJobData;
|
||||
import org.thoughtcrime.securesms.jobmanager.Job;
|
||||
import org.thoughtcrime.securesms.jobmanager.JsonJobData;
|
||||
|
||||
/**
|
||||
* A job that effectively debounces thread updates through a combination of having a max instance count
|
||||
@@ -36,8 +37,13 @@ public final class ThreadUpdateJob extends BaseJob {
|
||||
this.threadId = threadId;
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
public static void enqueue(long threadId) {
|
||||
ApplicationDependencies.getJobManager().add(new ThreadUpdateJob(threadId));
|
||||
if (ApplicationDependencies.getIncomingMessageObserver().getDecryptionDrained()) {
|
||||
SignalDatabase.threads().update(threadId, true);
|
||||
} else {
|
||||
ApplicationDependencies.getJobManager().add(new ThreadUpdateJob(threadId));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user