Refactor the RoomMessageEventStringBuilder to take a Style instead of a Destination
This make its usage clearer and makes different styles reusable
This commit is contained in:
committed by
Stefan Ceriu
parent
644a79aa5f
commit
0104ad06aa
@@ -19,7 +19,7 @@ struct NotificationContentBuilderTests {
|
||||
init() {
|
||||
notificationContent = .init()
|
||||
let stringBuilder = RoomMessageEventStringBuilder(attributedStringBuilder: AttributedStringBuilder(mentionBuilder: PlainMentionBuilder()),
|
||||
destination: .notification)
|
||||
style: .plain)
|
||||
mediaProvider = MediaProviderMock(configuration: .init())
|
||||
notificationContentBuilder = NotificationContentBuilder(messageEventStringBuilder: stringBuilder,
|
||||
notificationSoundName: UNNotificationSoundName("message.caf"),
|
||||
|
||||
@@ -21,7 +21,7 @@ struct RoomEventStringBuilderTests {
|
||||
|
||||
stringBuilder = RoomEventStringBuilder(stateEventStringBuilder: stateEventStringBuilder,
|
||||
messageEventStringBuilder: RoomMessageEventStringBuilder(attributedStringBuilder: attributedStringBuilder,
|
||||
destination: .roomList),
|
||||
style: .senderPrefixed),
|
||||
shouldDisambiguateDisplayNames: true,
|
||||
shouldPrefixSenderName: true)
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ final class RoomSummaryProviderTests {
|
||||
let attributedStringBuilder = AttributedStringBuilder(mentionBuilder: MentionBuilder())
|
||||
let eventStringBuilder = RoomEventStringBuilder(stateEventStringBuilder: stateEventStringBuilder,
|
||||
messageEventStringBuilder: RoomMessageEventStringBuilder(attributedStringBuilder: attributedStringBuilder,
|
||||
destination: .roomList),
|
||||
style: .senderPrefixed),
|
||||
shouldDisambiguateDisplayNames: true,
|
||||
shouldPrefixSenderName: true)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user