mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-24 02:22:44 +02:00
BubbleRoomCellLayoutUpdater & BubbleRoomTimelineCellDecorator: Use convenient message type property from MXEvent.
This commit is contained in:
@@ -160,10 +160,7 @@ class BubbleRoomCellLayoutUpdater: RoomCellLayoutUpdating {
|
||||
|
||||
switch firstEvent.eventType {
|
||||
case .roomMessage:
|
||||
if let messageTypeString = firstEvent.content["msgtype"] as? String {
|
||||
|
||||
let messageType = MXMessageType(identifier: messageTypeString)
|
||||
|
||||
if let messageType = firstEvent.messageType {
|
||||
switch messageType {
|
||||
case .text, .emote, .file:
|
||||
return true
|
||||
|
||||
+1
-4
@@ -217,10 +217,7 @@ class BubbleRoomTimelineCellDecorator: PlainRoomTimelineCellDecorator {
|
||||
|
||||
switch firstEvent.eventType {
|
||||
case .roomMessage:
|
||||
if let messageTypeString = firstEvent.content["msgtype"] as? String {
|
||||
|
||||
let messageType = MXMessageType(identifier: messageTypeString)
|
||||
|
||||
if let messageType = firstEvent.messageType {
|
||||
switch messageType {
|
||||
case .text, .emote, .file:
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user