mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
updated SDK and improved report flow
the report flow is now based on the matrix version and the new one will only be used if the SDK checks if the server supports it.
This commit is contained in:
@@ -108,9 +108,9 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
||||
.weakAssign(to: \.state.hideInviteAvatars, on: self)
|
||||
.store(in: &cancellables)
|
||||
|
||||
appSettings.$reportRoomEnabled
|
||||
.weakAssign(to: \.state.reportRoomEnabled, on: self)
|
||||
.store(in: &cancellables)
|
||||
Task {
|
||||
state.reportRoomEnabled = await userSession.clientProxy.isReportRoomSupported
|
||||
}
|
||||
|
||||
let isSearchFieldFocused = context.$viewState.map(\.bindings.isSearchFieldFocused)
|
||||
let searchQuery = context.$viewState.map(\.bindings.searchQuery)
|
||||
@@ -208,7 +208,7 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
||||
await acceptInvite(roomID: roomIdentifier)
|
||||
}
|
||||
case .declineInvite(let roomIdentifier):
|
||||
showDeclineInviteConfirmationAlert(roomID: roomIdentifier)
|
||||
Task { await showDeclineInviteConfirmationAlert(roomID: roomIdentifier) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
||||
}
|
||||
}
|
||||
|
||||
private func showDeclineInviteConfirmationAlert(roomID: String) {
|
||||
private func showDeclineInviteConfirmationAlert(roomID: String) async {
|
||||
guard let room = state.rooms.first(where: { $0.id == roomID }) else {
|
||||
displayError()
|
||||
return
|
||||
@@ -429,7 +429,7 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
||||
let title = room.isDirect ? L10n.screenInvitesDeclineDirectChatTitle : L10n.screenInvitesDeclineChatTitle
|
||||
let message = room.isDirect ? L10n.screenInvitesDeclineDirectChatMessage(roomPlaceholder) : L10n.screenInvitesDeclineChatMessage(roomPlaceholder)
|
||||
|
||||
if appSettings.reportInviteEnabled, let userID = room.inviter?.id {
|
||||
if await userSession.clientProxy.isReportRoomSupported, let userID = room.inviter?.id {
|
||||
state.bindings.alertInfo = .init(id: UUID(),
|
||||
title: title,
|
||||
message: message,
|
||||
|
||||
Reference in New Issue
Block a user