mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Show user statuses in the DM room header.
This commit is contained in:
@@ -16,7 +16,7 @@ struct ThreadTimelineScreenViewState: BindableState {
|
||||
var roomTitle: String
|
||||
var roomAvatar: RoomAvatar
|
||||
var canSendMessage = true
|
||||
var dmRecipientVerificationState: UserIdentityVerificationState?
|
||||
var dmRecipientDetails = RoomHeaderView.DMRecipientDetails()
|
||||
var roomHistorySharingState: RoomHistorySharingState?
|
||||
|
||||
var bindings = ThreadTimelineScreenViewStateBindings()
|
||||
|
||||
@@ -87,17 +87,17 @@ class ThreadTimelineScreenViewModel: ThreadTimelineScreenViewModelType, ThreadTi
|
||||
guard roomProxy.infoPublisher.value.isDM,
|
||||
let dmRecipient = roomProxy.membersPublisher.value.first(where: { $0.userID != roomProxy.ownUserID }),
|
||||
case let .success(userIdentity) = await userSession.clientProxy.userIdentity(for: dmRecipient.userID, fallBackToServer: true) else {
|
||||
state.dmRecipientVerificationState = .notVerified
|
||||
state.dmRecipientDetails.verification = .notVerified
|
||||
return
|
||||
}
|
||||
|
||||
guard let userIdentity else {
|
||||
MXLog.failure("User identity should be known at this point")
|
||||
state.dmRecipientVerificationState = .notVerified
|
||||
state.dmRecipientDetails.verification = .notVerified
|
||||
return
|
||||
}
|
||||
|
||||
state.dmRecipientVerificationState = userIdentity.verificationState
|
||||
state.dmRecipientDetails.verification = userIdentity.verificationState
|
||||
}
|
||||
|
||||
private func updateRoomInfo(_ roomInfo: RoomInfoProxyProtocol) {
|
||||
|
||||
@@ -70,7 +70,7 @@ struct ThreadTimelineScreen: View {
|
||||
RoomHeaderView(roomName: L10n.commonThread,
|
||||
roomSubtitle: context.viewState.roomTitle,
|
||||
roomAvatar: context.viewState.roomAvatar,
|
||||
dmRecipientVerificationState: context.viewState.dmRecipientVerificationState,
|
||||
dmRecipientDetails: context.viewState.dmRecipientDetails,
|
||||
roomHistorySharingState: context.viewState.roomHistorySharingState,
|
||||
mediaProvider: context.mediaProvider) {
|
||||
// There is no action but the iOS 26 designs have it looking like a button.
|
||||
|
||||
Reference in New Issue
Block a user