mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-24 10:35:19 +00:00
Add isControlMessage convenience variable
This commit is contained in:
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…
Reference in New Issue
Block a user