mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Final design for pending members when changing roles. (#2668)
* Final design for pending users when changing role. * Remove room moderation feature flag. * Fix tests. * Run periphery. * Update snapshots.
This commit is contained in:
@@ -7372,7 +7372,7 @@
|
|||||||
repositoryURL = "https://github.com/element-hq/compound-ios";
|
repositoryURL = "https://github.com/element-hq/compound-ios";
|
||||||
requirement = {
|
requirement = {
|
||||||
kind = revision;
|
kind = revision;
|
||||||
revision = 6d42477c54a1dae128e0cb3645e3d00a53a5736c;
|
revision = 5c8ee9be606768ad228d61aa3508df515f208908;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
F76A08D0EA29A07A54F4EB4D /* XCRemoteSwiftPackageReference "swift-collections" */ = {
|
F76A08D0EA29A07A54F4EB4D /* XCRemoteSwiftPackageReference "swift-collections" */ = {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/element-hq/compound-ios",
|
"location" : "https://github.com/element-hq/compound-ios",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "6d42477c54a1dae128e0cb3645e3d00a53a5736c"
|
"revision" : "5c8ee9be606768ad228d61aa3508df515f208908"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -263,7 +263,7 @@
|
|||||||
{
|
{
|
||||||
"identity" : "swiftui-introspect",
|
"identity" : "swiftui-introspect",
|
||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/siteline/SwiftUI-Introspect.git",
|
"location" : "https://github.com/siteline/SwiftUI-Introspect",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "b94da693e57eaf79d16464b8b7c90d09cba4e290",
|
"revision" : "b94da693e57eaf79d16464b8b7c90d09cba4e290",
|
||||||
"version" : "0.9.2"
|
"version" : "0.9.2"
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ final class AppSettings {
|
|||||||
case roomListFiltersEnabled
|
case roomListFiltersEnabled
|
||||||
case markAsUnreadEnabled
|
case markAsUnreadEnabled
|
||||||
case markAsFavouriteEnabled
|
case markAsFavouriteEnabled
|
||||||
case roomModerationEnabled
|
|
||||||
case publicSearchEnabled
|
case publicSearchEnabled
|
||||||
case qrCodeLoginEnabled
|
case qrCodeLoginEnabled
|
||||||
}
|
}
|
||||||
@@ -282,9 +281,6 @@ final class AppSettings {
|
|||||||
|
|
||||||
// MARK: - Feature Flags
|
// MARK: - Feature Flags
|
||||||
|
|
||||||
@UserPreference(key: UserDefaultsKeys.roomModerationEnabled, defaultValue: false, storageType: .userDefaults(store))
|
|
||||||
var roomModerationEnabled
|
|
||||||
|
|
||||||
@UserPreference(key: UserDefaultsKeys.publicSearchEnabled, defaultValue: false, storageType: .volatile)
|
@UserPreference(key: UserDefaultsKeys.publicSearchEnabled, defaultValue: false, storageType: .volatile)
|
||||||
var publicSearchEnabled
|
var publicSearchEnabled
|
||||||
|
|
||||||
|
|||||||
@@ -500,8 +500,7 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
|||||||
userIndicatorController: userIndicatorController,
|
userIndicatorController: userIndicatorController,
|
||||||
notificationSettings: userSession.clientProxy.notificationSettings,
|
notificationSettings: userSession.clientProxy.notificationSettings,
|
||||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: appSettings.permalinkBaseURL,
|
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: appSettings.permalinkBaseURL,
|
||||||
mentionBuilder: MentionBuilder()),
|
mentionBuilder: MentionBuilder()))
|
||||||
appSettings: appSettings)
|
|
||||||
let coordinator = RoomDetailsScreenCoordinator(parameters: params)
|
let coordinator = RoomDetailsScreenCoordinator(parameters: params)
|
||||||
coordinator.actions.sink { [weak self] action in
|
coordinator.actions.sink { [weak self] action in
|
||||||
guard let self else { return }
|
guard let self else { return }
|
||||||
@@ -543,7 +542,6 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
|||||||
let parameters = RoomMembersListScreenCoordinatorParameters(mediaProvider: userSession.mediaProvider,
|
let parameters = RoomMembersListScreenCoordinatorParameters(mediaProvider: userSession.mediaProvider,
|
||||||
roomProxy: roomProxy,
|
roomProxy: roomProxy,
|
||||||
userIndicatorController: userIndicatorController,
|
userIndicatorController: userIndicatorController,
|
||||||
appSettings: appSettings,
|
|
||||||
analytics: analytics)
|
analytics: analytics)
|
||||||
let coordinator = RoomMembersListScreenCoordinator(parameters: parameters)
|
let coordinator = RoomMembersListScreenCoordinator(parameters: parameters)
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ import MatrixRustSDK
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct RoomChangeRolesScreenRow: View {
|
struct RoomChangeRolesScreenRow: View {
|
||||||
@Environment(\.isEnabled) private var isEnabled
|
|
||||||
|
|
||||||
let member: RoomMemberDetails
|
let member: RoomMemberDetails
|
||||||
let imageProvider: ImageProviderProtocol?
|
let imageProvider: ImageProviderProtocol?
|
||||||
|
|
||||||
@@ -28,22 +26,13 @@ struct RoomChangeRolesScreenRow: View {
|
|||||||
let action: () -> Void
|
let action: () -> Void
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ListRow(label: .avatar(title: memberName,
|
ListRow(label: .avatar(title: member.name ?? member.id,
|
||||||
|
status: member.isInvited ? L10n.screenRoomMemberListPendingHeaderTitle : nil,
|
||||||
description: member.name == nil ? nil : member.id,
|
description: member.name == nil ? nil : member.id,
|
||||||
icon: avatar),
|
icon: avatar),
|
||||||
kind: .multiSelection(isSelected: isSelected, action: action))
|
kind: .multiSelection(isSelected: isSelected, action: action))
|
||||||
}
|
}
|
||||||
|
|
||||||
var memberName: String {
|
|
||||||
let name = member.name ?? member.id
|
|
||||||
|
|
||||||
return if member.isInvited {
|
|
||||||
L10n.screenRoomChangeRoleInvitedMemberName(name)
|
|
||||||
} else {
|
|
||||||
name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var avatar: LoadableAvatarImage {
|
var avatar: LoadableAvatarImage {
|
||||||
LoadableAvatarImage(url: member.avatarURL,
|
LoadableAvatarImage(url: member.avatarURL,
|
||||||
name: member.name,
|
name: member.name,
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ struct RoomDetailsScreenCoordinatorParameters {
|
|||||||
let userIndicatorController: UserIndicatorControllerProtocol
|
let userIndicatorController: UserIndicatorControllerProtocol
|
||||||
let notificationSettings: NotificationSettingsProxyProtocol
|
let notificationSettings: NotificationSettingsProxyProtocol
|
||||||
let attributedStringBuilder: AttributedStringBuilderProtocol
|
let attributedStringBuilder: AttributedStringBuilderProtocol
|
||||||
let appSettings: AppSettings
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enum RoomDetailsScreenCoordinatorAction {
|
enum RoomDetailsScreenCoordinatorAction {
|
||||||
@@ -55,8 +54,7 @@ final class RoomDetailsScreenCoordinator: CoordinatorProtocol {
|
|||||||
analyticsService: parameters.analyticsService,
|
analyticsService: parameters.analyticsService,
|
||||||
userIndicatorController: parameters.userIndicatorController,
|
userIndicatorController: parameters.userIndicatorController,
|
||||||
notificationSettingsProxy: parameters.notificationSettings,
|
notificationSettingsProxy: parameters.notificationSettings,
|
||||||
attributedStringBuilder: parameters.attributedStringBuilder,
|
attributedStringBuilder: parameters.attributedStringBuilder)
|
||||||
appSettings: parameters.appSettings)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Public
|
// MARK: - Public
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
|
|||||||
private let userIndicatorController: UserIndicatorControllerProtocol
|
private let userIndicatorController: UserIndicatorControllerProtocol
|
||||||
private let notificationSettingsProxy: NotificationSettingsProxyProtocol
|
private let notificationSettingsProxy: NotificationSettingsProxyProtocol
|
||||||
private let attributedStringBuilder: AttributedStringBuilderProtocol
|
private let attributedStringBuilder: AttributedStringBuilderProtocol
|
||||||
private let appSettings: AppSettings
|
|
||||||
|
|
||||||
private var dmRecipient: RoomMemberProxyProtocol?
|
private var dmRecipient: RoomMemberProxyProtocol?
|
||||||
|
|
||||||
@@ -43,8 +42,7 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
|
|||||||
analyticsService: AnalyticsService,
|
analyticsService: AnalyticsService,
|
||||||
userIndicatorController: UserIndicatorControllerProtocol,
|
userIndicatorController: UserIndicatorControllerProtocol,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyProtocol,
|
notificationSettingsProxy: NotificationSettingsProxyProtocol,
|
||||||
attributedStringBuilder: AttributedStringBuilderProtocol,
|
attributedStringBuilder: AttributedStringBuilderProtocol) {
|
||||||
appSettings: AppSettings) {
|
|
||||||
self.roomProxy = roomProxy
|
self.roomProxy = roomProxy
|
||||||
self.clientProxy = clientProxy
|
self.clientProxy = clientProxy
|
||||||
self.mediaProvider = mediaProvider
|
self.mediaProvider = mediaProvider
|
||||||
@@ -52,7 +50,6 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
|
|||||||
self.userIndicatorController = userIndicatorController
|
self.userIndicatorController = userIndicatorController
|
||||||
self.notificationSettingsProxy = notificationSettingsProxy
|
self.notificationSettingsProxy = notificationSettingsProxy
|
||||||
self.attributedStringBuilder = attributedStringBuilder
|
self.attributedStringBuilder = attributedStringBuilder
|
||||||
self.appSettings = appSettings
|
|
||||||
|
|
||||||
let topic = attributedStringBuilder.fromPlain(roomProxy.topic)
|
let topic = attributedStringBuilder.fromPlain(roomProxy.topic)
|
||||||
|
|
||||||
@@ -181,11 +178,7 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
|
|||||||
state.canEditRoomName = await (try? roomProxy.canUser(userID: roomProxy.ownUserID, sendStateEvent: .roomName).get()) == true
|
state.canEditRoomName = await (try? roomProxy.canUser(userID: roomProxy.ownUserID, sendStateEvent: .roomName).get()) == true
|
||||||
state.canEditRoomTopic = await (try? roomProxy.canUser(userID: roomProxy.ownUserID, sendStateEvent: .roomTopic).get()) == true
|
state.canEditRoomTopic = await (try? roomProxy.canUser(userID: roomProxy.ownUserID, sendStateEvent: .roomTopic).get()) == true
|
||||||
state.canEditRoomAvatar = await (try? roomProxy.canUser(userID: roomProxy.ownUserID, sendStateEvent: .roomAvatar).get()) == true
|
state.canEditRoomAvatar = await (try? roomProxy.canUser(userID: roomProxy.ownUserID, sendStateEvent: .roomAvatar).get()) == true
|
||||||
|
state.canEditRolesOrPermissions = await (try? roomProxy.suggestedRole(for: roomProxy.ownUserID).get()) == .administrator
|
||||||
if appSettings.roomModerationEnabled {
|
|
||||||
state.canEditRolesOrPermissions = await (try? roomProxy.suggestedRole(for: roomProxy.ownUserID).get()) == .administrator
|
|
||||||
}
|
|
||||||
|
|
||||||
state.canInviteUsers = await (try? roomProxy.canUserInvite(userID: roomProxy.ownUserID).get()) == true
|
state.canInviteUsers = await (try? roomProxy.canUserInvite(userID: roomProxy.ownUserID).get()) == true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -320,8 +320,7 @@ struct RoomDetailsScreen_Previews: PreviewProvider, TestablePreview {
|
|||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: notificationSettingsProxy,
|
notificationSettingsProxy: notificationSettingsProxy,
|
||||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: .userDirectory,
|
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: .userDirectory,
|
||||||
mentionBuilder: MentionBuilder()),
|
mentionBuilder: MentionBuilder()))
|
||||||
appSettings: ServiceLocator.shared.settings)
|
|
||||||
}()
|
}()
|
||||||
|
|
||||||
static let dmRoomViewModel = {
|
static let dmRoomViewModel = {
|
||||||
@@ -347,8 +346,7 @@ struct RoomDetailsScreen_Previews: PreviewProvider, TestablePreview {
|
|||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: notificationSettingsProxy,
|
notificationSettingsProxy: notificationSettingsProxy,
|
||||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: .userDirectory,
|
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: .userDirectory,
|
||||||
mentionBuilder: MentionBuilder()),
|
mentionBuilder: MentionBuilder()))
|
||||||
appSettings: ServiceLocator.shared.settings)
|
|
||||||
}()
|
}()
|
||||||
|
|
||||||
static let simpleRoomViewModel = {
|
static let simpleRoomViewModel = {
|
||||||
@@ -373,8 +371,7 @@ struct RoomDetailsScreen_Previews: PreviewProvider, TestablePreview {
|
|||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: notificationSettingsProxy,
|
notificationSettingsProxy: notificationSettingsProxy,
|
||||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: .userDirectory,
|
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: .userDirectory,
|
||||||
mentionBuilder: MentionBuilder()),
|
mentionBuilder: MentionBuilder()))
|
||||||
appSettings: ServiceLocator.shared.settings)
|
|
||||||
}()
|
}()
|
||||||
|
|
||||||
static var previews: some View {
|
static var previews: some View {
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ struct RoomMembersListScreenCoordinatorParameters {
|
|||||||
let mediaProvider: MediaProviderProtocol
|
let mediaProvider: MediaProviderProtocol
|
||||||
let roomProxy: RoomProxyProtocol
|
let roomProxy: RoomProxyProtocol
|
||||||
let userIndicatorController: UserIndicatorControllerProtocol
|
let userIndicatorController: UserIndicatorControllerProtocol
|
||||||
let appSettings: AppSettings
|
|
||||||
let analytics: AnalyticsService
|
let analytics: AnalyticsService
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,7 +43,6 @@ final class RoomMembersListScreenCoordinator: CoordinatorProtocol {
|
|||||||
viewModel = RoomMembersListScreenViewModel(roomProxy: parameters.roomProxy,
|
viewModel = RoomMembersListScreenViewModel(roomProxy: parameters.roomProxy,
|
||||||
mediaProvider: parameters.mediaProvider,
|
mediaProvider: parameters.mediaProvider,
|
||||||
userIndicatorController: parameters.userIndicatorController,
|
userIndicatorController: parameters.userIndicatorController,
|
||||||
appSettings: parameters.appSettings,
|
|
||||||
analytics: parameters.analytics)
|
analytics: parameters.analytics)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ typealias RoomMembersListScreenViewModelType = StateStoreViewModel<RoomMembersLi
|
|||||||
class RoomMembersListScreenViewModel: RoomMembersListScreenViewModelType, RoomMembersListScreenViewModelProtocol {
|
class RoomMembersListScreenViewModel: RoomMembersListScreenViewModelType, RoomMembersListScreenViewModelProtocol {
|
||||||
private let roomProxy: RoomProxyProtocol
|
private let roomProxy: RoomProxyProtocol
|
||||||
private let userIndicatorController: UserIndicatorControllerProtocol
|
private let userIndicatorController: UserIndicatorControllerProtocol
|
||||||
private let appSettings: AppSettings
|
|
||||||
private let analytics: AnalyticsService
|
private let analytics: AnalyticsService
|
||||||
|
|
||||||
private var members: [RoomMemberProxyProtocol] = []
|
private var members: [RoomMemberProxyProtocol] = []
|
||||||
@@ -37,11 +36,9 @@ class RoomMembersListScreenViewModel: RoomMembersListScreenViewModelType, RoomMe
|
|||||||
roomProxy: RoomProxyProtocol,
|
roomProxy: RoomProxyProtocol,
|
||||||
mediaProvider: MediaProviderProtocol,
|
mediaProvider: MediaProviderProtocol,
|
||||||
userIndicatorController: UserIndicatorControllerProtocol,
|
userIndicatorController: UserIndicatorControllerProtocol,
|
||||||
appSettings: AppSettings,
|
|
||||||
analytics: AnalyticsService) {
|
analytics: AnalyticsService) {
|
||||||
self.roomProxy = roomProxy
|
self.roomProxy = roomProxy
|
||||||
self.userIndicatorController = userIndicatorController
|
self.userIndicatorController = userIndicatorController
|
||||||
self.appSettings = appSettings
|
|
||||||
self.analytics = analytics
|
self.analytics = analytics
|
||||||
|
|
||||||
super.init(initialViewState: .init(joinedMembersCount: roomProxy.joinedMembersCount,
|
super.init(initialViewState: .init(joinedMembersCount: roomProxy.joinedMembersCount,
|
||||||
@@ -146,11 +143,6 @@ class RoomMembersListScreenViewModel: RoomMembersListScreenViewModelType, RoomMe
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func selectMember(_ member: RoomMemberDetails) {
|
private func selectMember(_ member: RoomMemberDetails) {
|
||||||
guard appSettings.roomModerationEnabled else {
|
|
||||||
showMemberDetails(member)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if member.isBanned { // No need to check canBan here, banned users are only shown when it is true.
|
if member.isBanned { // No need to check canBan here, banned users are only shown when it is true.
|
||||||
state.bindings.alertInfo = AlertInfo(id: .unbanConfirmation(member),
|
state.bindings.alertInfo = AlertInfo(id: .unbanConfirmation(member),
|
||||||
title: L10n.screenRoomMemberListManageMemberUnbanTitle,
|
title: L10n.screenRoomMemberListManageMemberUnbanTitle,
|
||||||
|
|||||||
-1
@@ -111,7 +111,6 @@ private extension RoomMembersListScreenViewModel {
|
|||||||
roomProxy: RoomProxyMock(with: .init(members: .allMembersAsAdmin)),
|
roomProxy: RoomProxyMock(with: .init(members: .allMembersAsAdmin)),
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
appSettings: ServiceLocator.shared.settings,
|
|
||||||
analytics: ServiceLocator.shared.analytics)
|
analytics: ServiceLocator.shared.analytics)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,7 +185,6 @@ struct RoomMembersListScreen_Previews: PreviewProvider, TestablePreview {
|
|||||||
canUserInvite: false)),
|
canUserInvite: false)),
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
appSettings: ServiceLocator.shared.settings,
|
|
||||||
analytics: ServiceLocator.shared.analytics)
|
analytics: ServiceLocator.shared.analytics)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
-1
@@ -110,7 +110,6 @@ struct RoomMembersListMemberCell_Previews: PreviewProvider, TestablePreview {
|
|||||||
members: members)),
|
members: members)),
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
appSettings: ServiceLocator.shared.settings,
|
|
||||||
analytics: ServiceLocator.shared.analytics)
|
analytics: ServiceLocator.shared.analytics)
|
||||||
static var previews: some View {
|
static var previews: some View {
|
||||||
VStack(spacing: 12) {
|
VStack(spacing: 12) {
|
||||||
|
|||||||
-1
@@ -48,7 +48,6 @@ protocol DeveloperOptionsProtocol: AnyObject {
|
|||||||
var otlpTracingEnabled: Bool { get set }
|
var otlpTracingEnabled: Bool { get set }
|
||||||
var shouldCollapseRoomStateEvents: Bool { get set }
|
var shouldCollapseRoomStateEvents: Bool { get set }
|
||||||
var hideUnreadMessagesBadge: Bool { get set }
|
var hideUnreadMessagesBadge: Bool { get set }
|
||||||
var roomModerationEnabled: Bool { get set }
|
|
||||||
var elementCallBaseURL: URL { get set }
|
var elementCallBaseURL: URL { get set }
|
||||||
var publicSearchEnabled: Bool { get set }
|
var publicSearchEnabled: Bool { get set }
|
||||||
var qrCodeLoginEnabled: Bool { get set }
|
var qrCodeLoginEnabled: Bool { get set }
|
||||||
|
|||||||
-3
@@ -33,9 +33,6 @@ struct DeveloperOptionsScreen: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Section("Room") {
|
Section("Room") {
|
||||||
Toggle(isOn: $context.roomModerationEnabled) {
|
|
||||||
Text("Moderation")
|
|
||||||
}
|
|
||||||
Toggle(isOn: $context.shouldCollapseRoomStateEvents) {
|
Toggle(isOn: $context.shouldCollapseRoomStateEvents) {
|
||||||
Text("Collapse room state events")
|
Text("Collapse room state events")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -475,7 +475,6 @@ class MockScreen: Identifiable {
|
|||||||
let coordinator = RoomMembersListScreenCoordinator(parameters: .init(mediaProvider: MockMediaProvider(),
|
let coordinator = RoomMembersListScreenCoordinator(parameters: .init(mediaProvider: MockMediaProvider(),
|
||||||
roomProxy: RoomProxyMock(with: .init(name: "test", members: members)),
|
roomProxy: RoomProxyMock(with: .init(name: "test", members: members)),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
appSettings: ServiceLocator.shared.settings,
|
|
||||||
analytics: ServiceLocator.shared.analytics))
|
analytics: ServiceLocator.shared.analytics))
|
||||||
navigationStackCoordinator.setRootCoordinator(coordinator)
|
navigationStackCoordinator.setRootCoordinator(coordinator)
|
||||||
return navigationStackCoordinator
|
return navigationStackCoordinator
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:46807025feb73e117f6b28714c6bed1a57f07715805ff095414b6d3434b50e02
|
oid sha256:1a3f27e14c0bd8552c607bb35d68a54f69ad441182f966f2756fc1f4b61c00b5
|
||||||
size 171903
|
size 168403
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:020740b909cc24411a71c50a3441d7e5eed03ff4f36012ac8a59dcf23a0fb765
|
oid sha256:59db25c19dff6db750313149b4b46cd53b63e347605414dbc3dd32524baf595c
|
||||||
size 179788
|
size 171391
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:30a969cfda9312547cd3aeaec4b481c166fed86857859eee4a7fe9d1cf1428c7
|
oid sha256:41745e770f7e788cbb4c208310a76a8f71355f5681cd5103ee13839ef1f033c6
|
||||||
size 112494
|
size 110383
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:b35ae18d8da3e7d8f6e7329c91da9f160a593778844173351839caa0ba70d512
|
oid sha256:ae6c33451f8e2886f34e551b8d7e5a4eb3b47363c5cd45ed659b0376c7f038b2
|
||||||
size 116418
|
size 113121
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:893cfb2098438fa3b65245c7890bb22220db0191b59b1ed83de5d5e2c90105ba
|
oid sha256:8cf3d6d752e771fca995ad3d7283fbee60bfd7614d22097f033b3bf1f91ab78b
|
||||||
size 223029
|
size 233824
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:7eb429c928fa34775a50872a47da74ccaff41fe2a43821b5915d0dd3a5702add
|
oid sha256:b31fa22226801415c912eba75810f02d40ac49a6fd1a4381d626ea1bb2bfee0c
|
||||||
size 164492
|
size 174497
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:5b3f53783e726420051b9d9d9dbc1a23f52e713cc9e7b3931c1caece41651dce
|
oid sha256:dd8485c8079834b2346e203f6ce396ca7c8704d353fb34d9453804d7d72a6a47
|
||||||
size 260290
|
size 278745
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:ef53de416133ab03394de7eb1ad4bd6eb7c3d8608b2dcd8f490cbbb62b3032df
|
oid sha256:78a38dcd6b66c838c6c3ec33098a11bc064d2c33f4b296973ad7b9f65c55248a
|
||||||
size 210610
|
size 227514
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:bd4bcbbd8f30ce34fa70f3e15e8075dd4fc5e08e1f460376016347155a87725d
|
oid sha256:64fce215cb9b466276f55f01c04c6a32f11c2108c09a96123a6e8ff573900936
|
||||||
size 150228
|
size 158911
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:f3c432347f8f8d4e5071abda3f5b3da2a470111313b8e1bd71c7e80100fb183f
|
oid sha256:51267cc2b70adcbbeb6c5df6d7560c9a49c58437cb04ab31d6fd05b7d3ad7bf9
|
||||||
size 101870
|
size 114025
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:650b60d501a8bbfc29b4410312aefb442e501d12023f449fc0da12a9787b76e8
|
oid sha256:58018bea77f7b28dfa0bbfe6bf0b16398bd159af2bd245f3d483eb1e99c68007
|
||||||
size 181087
|
size 196330
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:a269fcbb9424517aa2d475b0503b18c5ba3329c0870fe797f05ccb2ace483d19
|
oid sha256:c7625aa1976b07cc0759f2431f6a44ada887f3927c816be128a45d14642c25da
|
||||||
size 142369
|
size 152736
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:dea655a3375f6af082632d59c7ac020d24f292d8c7bb789bca13e2089425e7ed
|
oid sha256:4d75f55e3e084ff607745ae9efd832f2c9ca8b8f590c9b58f54fce670bf6a464
|
||||||
size 175262
|
size 174990
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:1c91a05fdf3a77b8bd445ab4be1c5da96cd0823ad1cf8cb0c77cba6d5cc8a3af
|
oid sha256:2cee67d5a943103957e8a5856bf0d7daf74cb8afa9a486bad8774ea7040ccb83
|
||||||
size 178792
|
size 179797
|
||||||
|
|||||||
@@ -40,8 +40,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: notificationSettingsProxyMock,
|
notificationSettingsProxy: notificationSettingsProxyMock,
|
||||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
||||||
mentionBuilder: MentionBuilder()),
|
mentionBuilder: MentionBuilder()))
|
||||||
appSettings: ServiceLocator.shared.settings)
|
|
||||||
|
|
||||||
AppSettings.resetAllSettings()
|
AppSettings.resetAllSettings()
|
||||||
}
|
}
|
||||||
@@ -56,8 +55,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
||||||
mentionBuilder: MentionBuilder()),
|
mentionBuilder: MentionBuilder()))
|
||||||
appSettings: ServiceLocator.shared.settings)
|
|
||||||
let deferred = deferFulfillment(context.$viewState) { state in
|
let deferred = deferFulfillment(context.$viewState) { state in
|
||||||
state.bindings.leaveRoomAlertItem != nil
|
state.bindings.leaveRoomAlertItem != nil
|
||||||
}
|
}
|
||||||
@@ -79,8 +77,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
||||||
mentionBuilder: MentionBuilder()),
|
mentionBuilder: MentionBuilder()))
|
||||||
appSettings: ServiceLocator.shared.settings)
|
|
||||||
let deferred = deferFulfillment(context.$viewState) { state in
|
let deferred = deferFulfillment(context.$viewState) { state in
|
||||||
state.bindings.leaveRoomAlertItem != nil
|
state.bindings.leaveRoomAlertItem != nil
|
||||||
}
|
}
|
||||||
@@ -103,8 +100,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
||||||
mentionBuilder: MentionBuilder()),
|
mentionBuilder: MentionBuilder()))
|
||||||
appSettings: ServiceLocator.shared.settings)
|
|
||||||
|
|
||||||
context.send(viewAction: .processTapLeave)
|
context.send(viewAction: .processTapLeave)
|
||||||
XCTAssertEqual(context.leaveRoomAlertItem?.state, .empty)
|
XCTAssertEqual(context.leaveRoomAlertItem?.state, .empty)
|
||||||
@@ -157,8 +153,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
||||||
mentionBuilder: MentionBuilder()),
|
mentionBuilder: MentionBuilder()))
|
||||||
appSettings: ServiceLocator.shared.settings)
|
|
||||||
|
|
||||||
let deferred = deferFulfillment(viewModel.context.$viewState) { state in
|
let deferred = deferFulfillment(viewModel.context.$viewState) { state in
|
||||||
state.dmRecipient != nil
|
state.dmRecipient != nil
|
||||||
@@ -181,8 +176,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
||||||
mentionBuilder: MentionBuilder()),
|
mentionBuilder: MentionBuilder()))
|
||||||
appSettings: ServiceLocator.shared.settings)
|
|
||||||
|
|
||||||
var deferred = deferFulfillment(viewModel.context.$viewState) { state in
|
var deferred = deferFulfillment(viewModel.context.$viewState) { state in
|
||||||
state.dmRecipient != nil
|
state.dmRecipient != nil
|
||||||
@@ -216,8 +210,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
||||||
mentionBuilder: MentionBuilder()),
|
mentionBuilder: MentionBuilder()))
|
||||||
appSettings: ServiceLocator.shared.settings)
|
|
||||||
|
|
||||||
var deferred = deferFulfillment(viewModel.context.$viewState) { state in
|
var deferred = deferFulfillment(viewModel.context.$viewState) { state in
|
||||||
state.dmRecipient != nil
|
state.dmRecipient != nil
|
||||||
@@ -250,8 +243,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
||||||
mentionBuilder: MentionBuilder()),
|
mentionBuilder: MentionBuilder()))
|
||||||
appSettings: ServiceLocator.shared.settings)
|
|
||||||
|
|
||||||
var deferred = deferFulfillment(viewModel.context.$viewState) { state in
|
var deferred = deferFulfillment(viewModel.context.$viewState) { state in
|
||||||
state.dmRecipient != nil
|
state.dmRecipient != nil
|
||||||
@@ -285,8 +277,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
||||||
mentionBuilder: MentionBuilder()),
|
mentionBuilder: MentionBuilder()))
|
||||||
appSettings: ServiceLocator.shared.settings)
|
|
||||||
|
|
||||||
var deferred = deferFulfillment(viewModel.context.$viewState) { state in
|
var deferred = deferFulfillment(viewModel.context.$viewState) { state in
|
||||||
state.dmRecipient != nil
|
state.dmRecipient != nil
|
||||||
@@ -321,8 +312,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
||||||
mentionBuilder: MentionBuilder()),
|
mentionBuilder: MentionBuilder()))
|
||||||
appSettings: ServiceLocator.shared.settings)
|
|
||||||
|
|
||||||
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
||||||
|
|
||||||
@@ -339,8 +329,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
||||||
mentionBuilder: MentionBuilder()),
|
mentionBuilder: MentionBuilder()))
|
||||||
appSettings: ServiceLocator.shared.settings)
|
|
||||||
|
|
||||||
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
||||||
|
|
||||||
@@ -376,8 +365,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
||||||
mentionBuilder: MentionBuilder()),
|
mentionBuilder: MentionBuilder()))
|
||||||
appSettings: ServiceLocator.shared.settings)
|
|
||||||
|
|
||||||
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
||||||
|
|
||||||
@@ -400,8 +388,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
||||||
mentionBuilder: MentionBuilder()),
|
mentionBuilder: MentionBuilder()))
|
||||||
appSettings: ServiceLocator.shared.settings)
|
|
||||||
|
|
||||||
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
||||||
|
|
||||||
@@ -424,8 +411,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
||||||
mentionBuilder: MentionBuilder()),
|
mentionBuilder: MentionBuilder()))
|
||||||
appSettings: ServiceLocator.shared.settings)
|
|
||||||
|
|
||||||
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
||||||
|
|
||||||
@@ -445,8 +431,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
||||||
mentionBuilder: MentionBuilder()),
|
mentionBuilder: MentionBuilder()))
|
||||||
appSettings: ServiceLocator.shared.settings)
|
|
||||||
|
|
||||||
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
||||||
|
|
||||||
@@ -466,8 +451,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
||||||
mentionBuilder: MentionBuilder()),
|
mentionBuilder: MentionBuilder()))
|
||||||
appSettings: ServiceLocator.shared.settings)
|
|
||||||
|
|
||||||
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
||||||
|
|
||||||
@@ -485,8 +469,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: notificationSettingsProxyMock,
|
notificationSettingsProxy: notificationSettingsProxyMock,
|
||||||
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
attributedStringBuilder: AttributedStringBuilder(permalinkBaseURL: ServiceLocator.shared.settings.permalinkBaseURL,
|
||||||
mentionBuilder: MentionBuilder()),
|
mentionBuilder: MentionBuilder()))
|
||||||
appSettings: ServiceLocator.shared.settings)
|
|
||||||
|
|
||||||
var deferred = deferFulfillment(context.$viewState) { state in
|
var deferred = deferFulfillment(context.$viewState) { state in
|
||||||
state.notificationSettingsState.isError
|
state.notificationSettingsState.isError
|
||||||
|
|||||||
@@ -286,14 +286,10 @@ class RoomMembersListScreenViewModelTests: XCTestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func setup(with members: [RoomMemberProxyMock]) {
|
private func setup(with members: [RoomMemberProxyMock]) {
|
||||||
AppSettings.resetAllSettings()
|
|
||||||
ServiceLocator.shared.settings.roomModerationEnabled = true
|
|
||||||
|
|
||||||
roomProxy = RoomProxyMock(with: .init(name: "test", members: members))
|
roomProxy = RoomProxyMock(with: .init(name: "test", members: members))
|
||||||
viewModel = .init(roomProxy: roomProxy,
|
viewModel = .init(roomProxy: roomProxy,
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
appSettings: ServiceLocator.shared.settings,
|
|
||||||
analytics: ServiceLocator.shared.analytics)
|
analytics: ServiceLocator.shared.analytics)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -52,7 +52,7 @@ packages:
|
|||||||
# path: ../matrix-rust-sdk
|
# path: ../matrix-rust-sdk
|
||||||
Compound:
|
Compound:
|
||||||
url: https://github.com/element-hq/compound-ios
|
url: https://github.com/element-hq/compound-ios
|
||||||
revision: 6d42477c54a1dae128e0cb3645e3d00a53a5736c
|
revision: 5c8ee9be606768ad228d61aa3508df515f208908
|
||||||
# path: ../compound-ios
|
# path: ../compound-ios
|
||||||
AnalyticsEvents:
|
AnalyticsEvents:
|
||||||
url: https://github.com/matrix-org/matrix-analytics-events
|
url: https://github.com/matrix-org/matrix-analytics-events
|
||||||
|
|||||||
Reference in New Issue
Block a user