mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-28 10:47:46 +00:00
Don't delete old call messages on new call message
This commit is contained in:
parent
f3bb2e5cfa
commit
ace7e3b54c
@ -448,9 +448,7 @@ public class SmsDatabase extends MessagingDatabase {
|
||||
|
||||
CallMessageType callMessageType = message.getCallType();
|
||||
if (callMessageType != null) {
|
||||
long callMessageTypeMask = getCallMessageTypeMask(callMessageType);
|
||||
type |= callMessageTypeMask;
|
||||
deleteInfoMessages(threadId, callMessageTypeMask);
|
||||
type |= getCallMessageTypeMask(callMessageType);
|
||||
}
|
||||
|
||||
ContentValues values = new ContentValues(6);
|
||||
@ -683,12 +681,6 @@ public class SmsDatabase extends MessagingDatabase {
|
||||
return getMessage(messageId);
|
||||
}
|
||||
|
||||
public void deleteInfoMessages(long threadId, long type) {
|
||||
String where = THREAD_ID + " = ? AND (" + TYPE + " & " + type + ") <> 0";
|
||||
int updated = getWritableDatabase().delete(TABLE_NAME, where, new String[] {threadId+""});
|
||||
notifyConversationListeners(threadId);
|
||||
}
|
||||
|
||||
private boolean isDuplicate(IncomingTextMessage message, long threadId) {
|
||||
SQLiteDatabase database = databaseHelper.getReadableDatabase();
|
||||
Cursor cursor = database.query(TABLE_NAME, null, DATE_SENT + " = ? AND " + ADDRESS + " = ? AND " + THREAD_ID + " = ?",
|
||||
|
Loading…
x
Reference in New Issue
Block a user