Hide or disable search in the encrypted rooms

This commit is contained in:
yostyle
2022-05-02 22:30:39 +02:00
parent 50c7b5b133
commit 9ed151cbfd
4 changed files with 9 additions and 1 deletions
@@ -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
}
@@ -48,6 +48,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)
}