mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Implement emotes (/me) (#1841)
* implement emotes (/me) requires matthew/emotes branch of matrix-rust-sdk * changelog + whitespace * remove apparently superfluous swiftlint * fix constness * remove inout params and incorporate review * switch to new api based on sdk PR feedback * Bump the RustSDK to v1.1.21 * Address PR comments --------- Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>
This commit is contained in:
@@ -615,10 +615,16 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
|
||||
} else {
|
||||
text = messageTimelineItem.body
|
||||
}
|
||||
case .emote(let emoteItem):
|
||||
if ServiceLocator.shared.settings.richTextEditorEnabled, let formattedBodyHTMLString = emoteItem.formattedBodyHTMLString {
|
||||
text = "/me " + formattedBodyHTMLString
|
||||
} else {
|
||||
text = "/me " + messageTimelineItem.body
|
||||
}
|
||||
default:
|
||||
text = messageTimelineItem.body
|
||||
}
|
||||
|
||||
|
||||
actionsSubject.send(.composer(action: .setText(text: text)))
|
||||
actionsSubject.send(.composer(action: .setMode(mode: .edit(originalItemId: messageTimelineItem.id))))
|
||||
case .copyPermalink:
|
||||
|
||||
Reference in New Issue
Block a user