mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-07 21:08:28 +00:00
Render Room and Message Pills (#3809)
* added a way to render the room and the message pills, but is WIP * permalinks now get converted into pills! * fixed an issue where room address mentions were not adding a URL properly but a string * updated tests * c * Revert "c" This reverts commit 5c80252fa23dba7e4d44f2a07fbf1e9500e37c82. * updated tests * more tests * created APIs to get a specific RoomSummary given the id or the alias * small mention builder improvement * pr suggestions
This commit is contained in:
@@ -9,6 +9,12 @@ import Foundation
|
||||
|
||||
// In the future we might use this to do some customisation in what is plain text used to represent mentions.
|
||||
struct PlainMentionBuilder: MentionBuilderProtocol {
|
||||
func handleEventOnRoomAliasMention(for attributedString: NSMutableAttributedString, in range: NSRange, url: URL, eventID: String, roomAlias: String) { }
|
||||
|
||||
func handleEventOnRoomIDMention(for attributedString: NSMutableAttributedString, in range: NSRange, url: URL, eventID: String, roomID: String) { }
|
||||
|
||||
func handleRoomAliasMention(for attributedString: NSMutableAttributedString, in range: NSRange, url: URL, roomAlias: String) { }
|
||||
|
||||
func handleAllUsersMention(for attributedString: NSMutableAttributedString, in range: NSRange) { }
|
||||
|
||||
func handleUserMention(for attributedString: NSMutableAttributedString, in range: NSRange, url: URL, userID: String, userDisplayName: String?) {
|
||||
@@ -17,4 +23,6 @@ struct PlainMentionBuilder: MentionBuilderProtocol {
|
||||
}
|
||||
attributedString.insert(NSAttributedString(string: "@"), at: range.location)
|
||||
}
|
||||
|
||||
func handleRoomIDMention(for attributedString: NSMutableAttributedString, in range: NSRange, url: URL, roomID: String) { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user