Add Calling Requests.

This commit is contained in:
Cody Henthorne
2020-07-06 16:27:03 -04:00
committed by Greyson Parrelli
parent 5a12eedc2c
commit 1e250ee95c
16 changed files with 192 additions and 182 deletions

View File

@@ -621,13 +621,13 @@ public class SmsDatabase extends MessagingDatabase {
long messageId = db.insert(TABLE_NAME, null, values);
DatabaseFactory.getThreadDatabase(context).update(threadId, true);
notifyConversationListeners(threadId);
ApplicationDependencies.getJobManager().add(new TrimThreadJob(threadId));
if (unread) {
DatabaseFactory.getThreadDatabase(context).incrementUnread(threadId, 1);
}
notifyConversationListeners(threadId);
ApplicationDependencies.getJobManager().add(new TrimThreadJob(threadId));
return new Pair<>(messageId, threadId);
}

View File

@@ -311,7 +311,11 @@ public class ThreadDatabase extends Database {
}
public boolean hasCalledSince(@NonNull Recipient recipient, long timestamp) {
return DatabaseFactory.getMmsSmsDatabase(context).hasReceivedAnyCallsSince(getThreadIdFor(recipient), timestamp);
return hasReceivedAnyCallsSince(getThreadIdFor(recipient), timestamp);
}
public boolean hasReceivedAnyCallsSince(long threadId, long timestamp) {
return DatabaseFactory.getMmsSmsDatabase(context).hasReceivedAnyCallsSince(threadId, timestamp);
}
public List<MarkedMessageInfo> setEntireThreadRead(long threadId) {