Do not update threads that do not exist.

This commit is contained in:
Cody Henthorne 2020-07-16 09:27:25 -04:00
parent 76dd09bc50
commit 5776c048ea

View File

@ -670,13 +670,11 @@ public class SmsDatabase extends MessagingDatabase {
values.put(BODY, body); values.put(BODY, body);
db.insert(TABLE_NAME, null, values); db.insert(TABLE_NAME, null, values);
});
for (long threadId : threadIdsToUpdate) { DatabaseFactory.getThreadDatabase(context).update(threadId, true);
DatabaseFactory.getThreadDatabase(context).update(threadId, true); notifyConversationListeners(threadId);
notifyConversationListeners(threadId); ApplicationDependencies.getJobManager().add(new TrimThreadJob(threadId));
ApplicationDependencies.getJobManager().add(new TrimThreadJob(threadId)); });
}
db.setTransactionSuccessful(); db.setTransactionSuccessful();
} finally { } finally {