mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-05 23:47:44 +02:00
Merge pull request #6098 from vector-im/yostyle/disable_search_encrypted_rooms
Hide or disable search in the encrypted rooms
This commit is contained in:
@@ -159,6 +159,7 @@ final class RoomInfoListViewController: UIViewController {
|
||||
// MARK: - Private
|
||||
|
||||
private func updateSections(with viewData: RoomInfoListViewData) {
|
||||
isRoomDirect = viewData.isDirect
|
||||
basicInfoView.configure(withViewData: viewData.basicInfoViewData)
|
||||
|
||||
var tmpSections: [Section] = []
|
||||
@@ -193,7 +194,9 @@ final class RoomInfoListViewController: UIViewController {
|
||||
}
|
||||
rows.append(rowMembers)
|
||||
rows.append(rowUploads)
|
||||
rows.append(rowSearch)
|
||||
if !viewData.isEncrypted {
|
||||
rows.append(rowSearch)
|
||||
}
|
||||
|
||||
let sectionSettings = Section(header: VectorL10n.roomInfoListSectionOther,
|
||||
rows: rows,
|
||||
|
||||
@@ -21,5 +21,7 @@ import Foundation
|
||||
/// View data object to represent view
|
||||
struct RoomInfoListViewData {
|
||||
let numberOfMembers: Int
|
||||
let isEncrypted: Bool
|
||||
let isDirect: Bool
|
||||
let basicInfoViewData: RoomInfoBasicViewData
|
||||
}
|
||||
|
||||
@@ -49,6 +49,8 @@ final class RoomInfoListViewModel: NSObject, RoomInfoListViewModelType {
|
||||
directUserPresence: directUserPresence)
|
||||
|
||||
return RoomInfoListViewData(numberOfMembers: Int(room.summary.membersCount.joined),
|
||||
isEncrypted: room.summary.isEncrypted,
|
||||
isDirect: room.isDirect,
|
||||
basicInfoViewData: basicInfoViewData)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user