Minor refactoring

This commit is contained in:
Niels Andriesse
2021-05-17 15:18:41 +10:00
parent cf3f0fbe57
commit 6b3aa86324
13 changed files with 106 additions and 138 deletions

View File

@@ -48,7 +48,8 @@ public interface MmsSmsColumns {
OUTGOING_CALL_TYPE};
//TODO clean unused keys
// TODO: Clean unused keys
// Message attributes
protected static final long MESSAGE_FORCE_SMS_BIT = 0x40;
@@ -74,9 +75,10 @@ public interface MmsSmsColumns {
protected static final long EXPIRATION_TIMER_UPDATE_BIT = 0x40000;
protected static final long GROUP_UPDATE_MESSAGE_BIT = 0x80000;
// Data Extraction Information
// Data Extraction Notification
protected static final long MEDIA_SAVED_EXTRACTION_BIT = 0x01000;
protected static final long SCREENSHOT_EXTRACTION_BIT = 0x02000;
// Open Group Invitation
protected static final long OPEN_GROUP_INVITATION_BIT = 0x04000;

View File

@@ -165,7 +165,7 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
mmsDatabase.endTransaction()
} else {
val smsDatabase = DatabaseFactory.getSmsDatabase(context)
val isOpenGroupInvitation = message.openGroupInvitation != null
val isOpenGroupInvitation = (message.openGroupInvitation != null)
val insertResult = if (message.sender == getUserPublicKey()) {
val textMessage = if (isOpenGroupInvitation) OutgoingTextMessage.fromOpenGroupInvitation(message.openGroupInvitation, targetRecipient, message.sentTimestamp)

View File

@@ -145,8 +145,6 @@ public abstract class DisplayRecord {
return isMediaSavedExtraction() || isScreenshotExtraction();
}
// Open Group Invitation
public boolean isOpenGroupInvitation() {
return MmsSmsColumns.Types.isOpenGroupInvitation(type);
}