Skip to content

Commit

Permalink
Do not update threads that do not exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
cody-signal committed Jul 16, 2020
1 parent 76dd09b commit 5776c04
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -670,13 +670,11 @@ public void insertProfileNameChangeMessages(@NonNull Recipient recipient, @NonNu
values.put(BODY, body);

db.insert(TABLE_NAME, null, values);
});

for (long threadId : threadIdsToUpdate) {
DatabaseFactory.getThreadDatabase(context).update(threadId, true);
notifyConversationListeners(threadId);
ApplicationDependencies.getJobManager().add(new TrimThreadJob(threadId));
}
DatabaseFactory.getThreadDatabase(context).update(threadId, true);
notifyConversationListeners(threadId);
ApplicationDependencies.getJobManager().add(new TrimThreadJob(threadId));
});

db.setTransactionSuccessful();
} finally {
Expand Down

0 comments on commit 5776c04

Please sign in to comment.