Add isControlMessage convenience variable

pull/619/head
nielsandriesse 4 years ago
parent 7710a2c32f
commit b000be9037

@ -32,7 +32,7 @@ class ConversationAdapter(context: Context, cursor: Cursor) : CursorRecyclerView
override fun getItemViewType(cursor: Cursor): Int {
val message = getMessage(cursor)!!
if (message.isExpirationTimerUpdate) { return ViewType.Control.rawValue }
if (message.isControlMessage) { return ViewType.Control.rawValue }
return ViewType.Visible.rawValue
}

@ -127,4 +127,8 @@ public abstract class DisplayRecord {
public boolean isMissedCall() {
return SmsDatabase.Types.isMissedCall(type);
}
public boolean isControlMessage() {
return isGroupUpdateMessage() || isExpirationTimerUpdate() || isDataExtractionNotification();
}
}

Loading…
Cancel
Save