mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Plain composer suggestions and pills (#2751)
* Move ComposerToolbar files to withing the RoomScreen folder (as it's not a screen on its own) * Switch the plain composer to NSAttributedStrings * Enable suggestions on the plain composer * Introduce a new `MatrixUserDisplayName` attributed string attributed and use it for mention building * Implement mention pill rendering and sending on the plain message composer * Fix plain composer snapshot tests * Fix broken formatting options layout * Add clarifying comment.
This commit is contained in:
@@ -26,6 +26,13 @@ enum UserIDAttribute: AttributedStringKey {
|
||||
static var name = "MXUserIDAttribute"
|
||||
}
|
||||
|
||||
/// This attribute is used to help the composer convert a mention into to a markdown link before sending
|
||||
/// the message. It doesn't interact mention pills, as these fetch display names live from the room.
|
||||
enum UserDisplayNameAttribute: AttributedStringKey {
|
||||
typealias Value = String
|
||||
static var name = "MXUserDisplayNameAttribute"
|
||||
}
|
||||
|
||||
enum RoomIDAttribute: AttributedStringKey {
|
||||
typealias Value = String
|
||||
static var name = "MXRoomIDAttribute"
|
||||
@@ -65,6 +72,7 @@ extension AttributeScopes {
|
||||
let blockquote: BlockquoteAttribute
|
||||
|
||||
let userID: UserIDAttribute
|
||||
let userDisplayName: UserDisplayNameAttribute
|
||||
let roomID: RoomIDAttribute
|
||||
let roomAlias: RoomAliasAttribute
|
||||
let eventOnRoomID: EventOnRoomIDAttribute
|
||||
|
||||
Reference in New Issue
Block a user