mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Extend the room details screen hook (#6173)
* Allow Enterprise sections in room details Signed-off-by: Daniel Anderson <daniel.anderson@toptal.com> * Update the Enterprise submodule and strings Signed-off-by: Daniel Anderson <daniel.anderson@toptal.com> --------- Signed-off-by: Daniel Anderson <daniel.anderson@toptal.com>
This commit is contained in:
@@ -40,6 +40,7 @@ struct DMRecipientInfo {
|
||||
}
|
||||
|
||||
struct RoomDetailsScreenViewState: BindableState {
|
||||
let appHooks: AppHooks
|
||||
var details: RoomDetails
|
||||
|
||||
var isEncrypted: Bool
|
||||
|
||||
@@ -60,7 +60,8 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
|
||||
|
||||
let topic = attributedStringBuilder.fromPlain(roomProxy.infoPublisher.value.topic)
|
||||
|
||||
let viewState = RoomDetailsScreenViewState(details: roomProxy.details,
|
||||
let viewState = RoomDetailsScreenViewState(appHooks: appHooks,
|
||||
details: roomProxy.details,
|
||||
isEncrypted: roomProxy.infoPublisher.value.isEncrypted,
|
||||
isDirect: roomProxy.infoPublisher.value.isDirect,
|
||||
topic: topic,
|
||||
|
||||
@@ -20,6 +20,10 @@ struct RoomDetailsScreen: View {
|
||||
|
||||
topicSection
|
||||
|
||||
context.viewState.appHooks
|
||||
.roomDetailsScreenHook
|
||||
.additionalSections()
|
||||
|
||||
aboutSection
|
||||
|
||||
// The invitation flow is different for DMs
|
||||
|
||||
Reference in New Issue
Block a user