Merge branch 'develop' into doug/fix_warnings

# Conflicts:
#	Riot/Modules/Room/RoomInfo/RoomInfoList/RoomInfoListViewController.swift
This commit is contained in:
Doug
2021-07-12 17:54:34 +01:00
72 changed files with 1920 additions and 116 deletions
@@ -24,25 +24,21 @@ enum RoomInfoListTarget: Equatable {
case uploads
case integrations
case search
var tabIndex: UInt {
let tabIndex: UInt
case notifications
var tabIndex: UInt? {
switch self {
case .members:
tabIndex = 0
return 0
case .uploads:
tabIndex = 1
return 1
case .settings:
tabIndex = 2
case .integrations:
tabIndex = 3
case .search:
tabIndex = 4
return 2
default:
return nil
}
return tabIndex
}
}
/// RoomInfoListViewController view actions exposed to view model
@@ -150,6 +150,9 @@ final class RoomInfoListViewController: UIViewController {
let rowSettings = Row(type: .default, icon: Asset.Images.settingsIcon.image, text: VectorL10n.roomDetailsSettings, accessoryType: .disclosureIndicator) {
self.viewModel.process(viewAction: .navigate(target: .settings()))
}
let roomNotifications = Row(type: .default, icon: Asset.Images.notifications.image, text: VectorL10n.roomDetailsNotifs, accessoryType: .disclosureIndicator) {
self.viewModel.process(viewAction: .navigate(target: .notifications))
}
let text = viewData.numberOfMembers == 1 ? VectorL10n.roomInfoListOneMember : VectorL10n.roomInfoListSeveralMembers(String(viewData.numberOfMembers))
let rowMembers = Row(type: .default, icon: Asset.Images.userIcon.image, text: text, accessoryType: .disclosureIndicator) {
self.viewModel.process(viewAction: .navigate(target: .members))
@@ -165,6 +168,10 @@ final class RoomInfoListViewController: UIViewController {
}
var rows = [rowSettings]
if BuildSettings.roomSettingsScreenShowNotificationsV2 {
rows.append(roomNotifications)
}
if RiotSettings.shared.roomInfoScreenShowIntegrations {
rows.append(rowIntegrations)
}