Use RustSDK permalink builders:

- replace event permalinks on the room screen interaction handler
- replace the one use don the room details screen
- deprecate previous AttributedStringBuilder methods
- there's more work required on the AttributedStringBuilder mentions handler before we can completely drop the iOS implementations
This commit is contained in:
Stefan Ceriu
2024-04-01 10:07:30 +03:00
parent 2e6c5c036a
commit 834a830952
8 changed files with 104 additions and 26 deletions
@@ -59,7 +59,6 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
super.init(initialViewState: .init(details: roomProxy.details,
isEncrypted: roomProxy.isEncrypted,
isDirect: roomProxy.isDirect,
permalink: roomProxy.permalink,
topic: topic,
topicSummary: topic?.unattributedStringByReplacingNewlinesWithSpaces(),
joinedMembersCount: roomProxy.joinedMembersCount,
@@ -67,6 +66,12 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
bindings: .init()),
imageProvider: mediaProvider)
Task {
if case let .success(permalinkURL) = await roomProxy.matrixToPermalink() {
state.permalink = permalinkURL
}
}
updateRoomInfo()
Task { await updatePowerLevelPermissions() }