mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-11 13:59:13 +00:00
Remove notification settings feature flag (#1693)
This commit is contained in:
parent
f96969ac37
commit
8268ecc036
@ -37,7 +37,6 @@ final class AppSettings {
|
|||||||
case userSuggestionsEnabled
|
case userSuggestionsEnabled
|
||||||
case readReceiptsEnabled
|
case readReceiptsEnabled
|
||||||
case hasShownWelcomeScreen
|
case hasShownWelcomeScreen
|
||||||
case notificationSettingsEnabled
|
|
||||||
case swiftUITimelineEnabled
|
case swiftUITimelineEnabled
|
||||||
case richTextEditorEnabled
|
case richTextEditorEnabled
|
||||||
}
|
}
|
||||||
@ -236,9 +235,6 @@ final class AppSettings {
|
|||||||
@UserPreference(key: UserDefaultsKeys.readReceiptsEnabled, defaultValue: false, storageType: .userDefaults(store))
|
@UserPreference(key: UserDefaultsKeys.readReceiptsEnabled, defaultValue: false, storageType: .userDefaults(store))
|
||||||
var readReceiptsEnabled
|
var readReceiptsEnabled
|
||||||
|
|
||||||
@UserPreference(key: UserDefaultsKeys.notificationSettingsEnabled, defaultValue: false, storageType: .userDefaults(store))
|
|
||||||
var notificationSettingsEnabled
|
|
||||||
|
|
||||||
@UserPreference(key: UserDefaultsKeys.swiftUITimelineEnabled, defaultValue: false, storageType: .volatile)
|
@UserPreference(key: UserDefaultsKeys.swiftUITimelineEnabled, defaultValue: false, storageType: .volatile)
|
||||||
var swiftUITimelineEnabled
|
var swiftUITimelineEnabled
|
||||||
|
|
||||||
|
@ -268,7 +268,7 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
|||||||
private func buildRoom(with details: RoomSummaryDetails, invalidated: Bool) -> HomeScreenRoom {
|
private func buildRoom(with details: RoomSummaryDetails, invalidated: Bool) -> HomeScreenRoom {
|
||||||
let identifier = invalidated ? "invalidated-" + details.id : details.id
|
let identifier = invalidated ? "invalidated-" + details.id : details.id
|
||||||
|
|
||||||
let notificationMode = details.notificationMode == .allMessages || appSettings.notificationSettingsEnabled == false ? nil : details.notificationMode
|
let notificationMode = details.notificationMode == .allMessages ? nil : details.notificationMode
|
||||||
|
|
||||||
return HomeScreenRoom(id: identifier,
|
return HomeScreenRoom(id: identifier,
|
||||||
roomId: details.id,
|
roomId: details.id,
|
||||||
|
@ -54,8 +54,7 @@ final class RoomDetailsScreenCoordinator: CoordinatorProtocol {
|
|||||||
roomProxy: parameters.roomProxy,
|
roomProxy: parameters.roomProxy,
|
||||||
mediaProvider: parameters.mediaProvider,
|
mediaProvider: parameters.mediaProvider,
|
||||||
userIndicatorController: parameters.userIndicatorController,
|
userIndicatorController: parameters.userIndicatorController,
|
||||||
notificationSettingsProxy: parameters.notificationSettings,
|
notificationSettingsProxy: parameters.notificationSettings)
|
||||||
appSettings: ServiceLocator.shared.settings)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Public
|
// MARK: - Public
|
||||||
|
@ -48,7 +48,6 @@ struct RoomDetailsScreenViewState: BindableState {
|
|||||||
var canEditRoomName = false
|
var canEditRoomName = false
|
||||||
var canEditRoomTopic = false
|
var canEditRoomTopic = false
|
||||||
var canEditRoomAvatar = false
|
var canEditRoomAvatar = false
|
||||||
let showNotificationSettings: Bool
|
|
||||||
var notificationSettingsState: RoomDetailsNotificationSettingsState = .loading
|
var notificationSettingsState: RoomDetailsNotificationSettingsState = .loading
|
||||||
|
|
||||||
var canEdit: Bool {
|
var canEdit: Bool {
|
||||||
@ -64,10 +63,7 @@ struct RoomDetailsScreenViewState: BindableState {
|
|||||||
var dmRecipient: RoomMemberDetails?
|
var dmRecipient: RoomMemberDetails?
|
||||||
|
|
||||||
var shortcuts: [RoomDetailsScreenViewShortcut] {
|
var shortcuts: [RoomDetailsScreenViewShortcut] {
|
||||||
var shortcuts: [RoomDetailsScreenViewShortcut] = []
|
var shortcuts: [RoomDetailsScreenViewShortcut] = [.mute]
|
||||||
if showNotificationSettings {
|
|
||||||
shortcuts.append(.mute)
|
|
||||||
}
|
|
||||||
if let permalink = dmRecipient?.permalink {
|
if let permalink = dmRecipient?.permalink {
|
||||||
shortcuts.append(.share(link: permalink))
|
shortcuts.append(.share(link: permalink))
|
||||||
} else if let permalink {
|
} else if let permalink {
|
||||||
|
@ -38,8 +38,7 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
|
|||||||
roomProxy: RoomProxyProtocol,
|
roomProxy: RoomProxyProtocol,
|
||||||
mediaProvider: MediaProviderProtocol,
|
mediaProvider: MediaProviderProtocol,
|
||||||
userIndicatorController: UserIndicatorControllerProtocol,
|
userIndicatorController: UserIndicatorControllerProtocol,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyProtocol,
|
notificationSettingsProxy: NotificationSettingsProxyProtocol) {
|
||||||
appSettings: AppSettings) {
|
|
||||||
self.accountUserID = accountUserID
|
self.accountUserID = accountUserID
|
||||||
self.roomProxy = roomProxy
|
self.roomProxy = roomProxy
|
||||||
self.mediaProvider = mediaProvider
|
self.mediaProvider = mediaProvider
|
||||||
@ -55,7 +54,6 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
|
|||||||
topic: roomProxy.topic,
|
topic: roomProxy.topic,
|
||||||
avatarURL: roomProxy.avatarURL,
|
avatarURL: roomProxy.avatarURL,
|
||||||
joinedMembersCount: roomProxy.joinedMembersCount,
|
joinedMembersCount: roomProxy.joinedMembersCount,
|
||||||
showNotificationSettings: appSettings.notificationSettingsEnabled,
|
|
||||||
notificationSettingsState: .loading,
|
notificationSettingsState: .loading,
|
||||||
bindings: .init()),
|
bindings: .init()),
|
||||||
imageProvider: mediaProvider)
|
imageProvider: mediaProvider)
|
||||||
|
@ -32,9 +32,7 @@ struct RoomDetailsScreen: View {
|
|||||||
|
|
||||||
topicSection
|
topicSection
|
||||||
|
|
||||||
if context.viewState.showNotificationSettings {
|
notificationSection
|
||||||
notificationSection
|
|
||||||
}
|
|
||||||
|
|
||||||
if context.viewState.dmRecipient == nil {
|
if context.viewState.dmRecipient == nil {
|
||||||
aboutSection
|
aboutSection
|
||||||
@ -277,14 +275,12 @@ struct RoomDetailsScreen_Previews: PreviewProvider {
|
|||||||
notificationSettingsProxyMockConfiguration.roomMode.isDefault = false
|
notificationSettingsProxyMockConfiguration.roomMode.isDefault = false
|
||||||
let notificationSettingsProxy = NotificationSettingsProxyMock(with: notificationSettingsProxyMockConfiguration)
|
let notificationSettingsProxy = NotificationSettingsProxyMock(with: notificationSettingsProxyMockConfiguration)
|
||||||
let appSettings = AppSettings()
|
let appSettings = AppSettings()
|
||||||
appSettings.notificationSettingsEnabled = true
|
|
||||||
|
|
||||||
return RoomDetailsScreenViewModel(accountUserID: "@owner:somewhere.com",
|
return RoomDetailsScreenViewModel(accountUserID: "@owner:somewhere.com",
|
||||||
roomProxy: roomProxy,
|
roomProxy: roomProxy,
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: notificationSettingsProxy,
|
notificationSettingsProxy: notificationSettingsProxy)
|
||||||
appSettings: appSettings)
|
|
||||||
}()
|
}()
|
||||||
|
|
||||||
static let dmRoomViewModel = {
|
static let dmRoomViewModel = {
|
||||||
@ -307,8 +303,7 @@ struct RoomDetailsScreen_Previews: PreviewProvider {
|
|||||||
roomProxy: roomProxy,
|
roomProxy: roomProxy,
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: notificationSettingsProxy,
|
notificationSettingsProxy: notificationSettingsProxy)
|
||||||
appSettings: appSettings)
|
|
||||||
}()
|
}()
|
||||||
|
|
||||||
static let simpleRoomViewModel = {
|
static let simpleRoomViewModel = {
|
||||||
@ -328,8 +323,7 @@ struct RoomDetailsScreen_Previews: PreviewProvider {
|
|||||||
roomProxy: roomProxy,
|
roomProxy: roomProxy,
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: notificationSettingsProxy,
|
notificationSettingsProxy: notificationSettingsProxy)
|
||||||
appSettings: appSettings)
|
|
||||||
}()
|
}()
|
||||||
|
|
||||||
static var previews: some View {
|
static var previews: some View {
|
||||||
|
@ -48,7 +48,6 @@ protocol DeveloperOptionsProtocol: AnyObject {
|
|||||||
var shouldCollapseRoomStateEvents: Bool { get set }
|
var shouldCollapseRoomStateEvents: Bool { get set }
|
||||||
var userSuggestionsEnabled: Bool { get set }
|
var userSuggestionsEnabled: Bool { get set }
|
||||||
var readReceiptsEnabled: Bool { get set }
|
var readReceiptsEnabled: Bool { get set }
|
||||||
var notificationSettingsEnabled: Bool { get set }
|
|
||||||
var swiftUITimelineEnabled: Bool { get set }
|
var swiftUITimelineEnabled: Bool { get set }
|
||||||
var richTextEditorEnabled: Bool { get set }
|
var richTextEditorEnabled: Bool { get set }
|
||||||
}
|
}
|
||||||
|
@ -47,13 +47,6 @@ struct DeveloperOptionsScreen: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Section("Notifications") {
|
|
||||||
Toggle(isOn: $context.notificationSettingsEnabled) {
|
|
||||||
Text("Show notification settings")
|
|
||||||
Text("Requires app reboot")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Section("Room creation") {
|
Section("Room creation") {
|
||||||
Toggle(isOn: $context.userSuggestionsEnabled) {
|
Toggle(isOn: $context.userSuggestionsEnabled) {
|
||||||
Text("User suggestions")
|
Text("User suggestions")
|
||||||
|
@ -37,7 +37,6 @@ struct SettingsScreenViewState: BindableState {
|
|||||||
var userAvatarURL: URL?
|
var userAvatarURL: URL?
|
||||||
var userDisplayName: String?
|
var userDisplayName: String?
|
||||||
var showSessionVerificationSection: Bool
|
var showSessionVerificationSection: Bool
|
||||||
var showNotificationSettings: Bool
|
|
||||||
var showDeveloperOptions: Bool
|
var showDeveloperOptions: Bool
|
||||||
|
|
||||||
/// The presentation anchor used to display the OIDC account URL.
|
/// The presentation anchor used to display the OIDC account URL.
|
||||||
|
@ -41,7 +41,6 @@ class SettingsScreenViewModel: SettingsScreenViewModelType, SettingsScreenViewMo
|
|||||||
userID: userSession.userID,
|
userID: userSession.userID,
|
||||||
accountURL: userSession.clientProxy.accountURL,
|
accountURL: userSession.clientProxy.accountURL,
|
||||||
showSessionVerificationSection: showSessionVerificationSection,
|
showSessionVerificationSection: showSessionVerificationSection,
|
||||||
showNotificationSettings: appSettings.notificationSettingsEnabled,
|
|
||||||
showDeveloperOptions: appSettings.canShowDeveloperOptions),
|
showDeveloperOptions: appSettings.canShowDeveloperOptions),
|
||||||
imageProvider: userSession.mediaProvider)
|
imageProvider: userSession.mediaProvider)
|
||||||
|
|
||||||
@ -52,11 +51,7 @@ class SettingsScreenViewModel: SettingsScreenViewModelType, SettingsScreenViewMo
|
|||||||
userSession.clientProxy.avatarURLPublisher
|
userSession.clientProxy.avatarURLPublisher
|
||||||
.weakAssign(to: \.state.userAvatarURL, on: self)
|
.weakAssign(to: \.state.userAvatarURL, on: self)
|
||||||
.store(in: &cancellables)
|
.store(in: &cancellables)
|
||||||
|
|
||||||
appSettings.$notificationSettingsEnabled
|
|
||||||
.weakAssign(to: \.state.showNotificationSettings, on: self)
|
|
||||||
.store(in: &cancellables)
|
|
||||||
|
|
||||||
Task {
|
Task {
|
||||||
await userSession.clientProxy.loadUserAvatarURL()
|
await userSession.clientProxy.loadUserAvatarURL()
|
||||||
}
|
}
|
||||||
|
@ -124,14 +124,12 @@ struct SettingsScreen: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Notifications
|
// Notifications
|
||||||
if context.viewState.showNotificationSettings {
|
ListRow(label: .default(title: L10n.screenNotificationSettingsTitle,
|
||||||
ListRow(label: .default(title: L10n.screenNotificationSettingsTitle,
|
systemIcon: .bell),
|
||||||
systemIcon: .bell),
|
kind: .navigationLink {
|
||||||
kind: .navigationLink {
|
context.send(viewAction: .notifications)
|
||||||
context.send(viewAction: .notifications)
|
})
|
||||||
})
|
.accessibilityIdentifier(A11yIdentifiers.settingsScreen.notifications)
|
||||||
.accessibilityIdentifier(A11yIdentifiers.settingsScreen.notifications)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Analytics
|
// Analytics
|
||||||
ListRow(label: .default(title: L10n.commonAnalytics,
|
ListRow(label: .default(title: L10n.commonAnalytics,
|
||||||
@ -225,7 +223,6 @@ struct SettingsScreen_Previews: PreviewProvider {
|
|||||||
deviceID: "AAAAAAAAAAA",
|
deviceID: "AAAAAAAAAAA",
|
||||||
accountURL: "https://matrix.org/account"),
|
accountURL: "https://matrix.org/account"),
|
||||||
mediaProvider: MockMediaProvider())
|
mediaProvider: MockMediaProvider())
|
||||||
ServiceLocator.shared.settings.notificationSettingsEnabled = true
|
|
||||||
return SettingsScreenViewModel(userSession: userSession,
|
return SettingsScreenViewModel(userSession: userSession,
|
||||||
appSettings: ServiceLocator.shared.settings)
|
appSettings: ServiceLocator.shared.settings)
|
||||||
}()
|
}()
|
||||||
|
@ -405,7 +405,6 @@ class ClientProxy: ClientProxyProtocol {
|
|||||||
roomSummaryProvider = RoomSummaryProvider(roomListService: roomListService,
|
roomSummaryProvider = RoomSummaryProvider(roomListService: roomListService,
|
||||||
eventStringBuilder: eventStringBuilder,
|
eventStringBuilder: eventStringBuilder,
|
||||||
name: "AllRooms",
|
name: "AllRooms",
|
||||||
appSettings: appSettings,
|
|
||||||
notificationSettings: notificationSettings,
|
notificationSettings: notificationSettings,
|
||||||
backgroundTaskService: backgroundTaskService)
|
backgroundTaskService: backgroundTaskService)
|
||||||
try await roomSummaryProvider?.setRoomList(roomListService.allRooms())
|
try await roomSummaryProvider?.setRoomList(roomListService.allRooms())
|
||||||
@ -413,7 +412,6 @@ class ClientProxy: ClientProxyProtocol {
|
|||||||
inviteSummaryProvider = RoomSummaryProvider(roomListService: roomListService,
|
inviteSummaryProvider = RoomSummaryProvider(roomListService: roomListService,
|
||||||
eventStringBuilder: eventStringBuilder,
|
eventStringBuilder: eventStringBuilder,
|
||||||
name: "Invites",
|
name: "Invites",
|
||||||
appSettings: appSettings,
|
|
||||||
notificationSettings: notificationSettings,
|
notificationSettings: notificationSettings,
|
||||||
backgroundTaskService: backgroundTaskService)
|
backgroundTaskService: backgroundTaskService)
|
||||||
try await inviteSummaryProvider?.setRoomList(roomListService.invites())
|
try await inviteSummaryProvider?.setRoomList(roomListService.invites())
|
||||||
|
@ -22,7 +22,6 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
|||||||
private let roomListService: RoomListServiceProtocol
|
private let roomListService: RoomListServiceProtocol
|
||||||
private let eventStringBuilder: RoomEventStringBuilder
|
private let eventStringBuilder: RoomEventStringBuilder
|
||||||
private let name: String
|
private let name: String
|
||||||
private var appSettings: AppSettings
|
|
||||||
private let notificationSettings: NotificationSettingsProxyProtocol
|
private let notificationSettings: NotificationSettingsProxyProtocol
|
||||||
private let backgroundTaskService: BackgroundTaskServiceProtocol
|
private let backgroundTaskService: BackgroundTaskServiceProtocol
|
||||||
|
|
||||||
@ -58,14 +57,12 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
|||||||
init(roomListService: RoomListServiceProtocol,
|
init(roomListService: RoomListServiceProtocol,
|
||||||
eventStringBuilder: RoomEventStringBuilder,
|
eventStringBuilder: RoomEventStringBuilder,
|
||||||
name: String,
|
name: String,
|
||||||
appSettings: AppSettings,
|
|
||||||
notificationSettings: NotificationSettingsProxyProtocol,
|
notificationSettings: NotificationSettingsProxyProtocol,
|
||||||
backgroundTaskService: BackgroundTaskServiceProtocol) {
|
backgroundTaskService: BackgroundTaskServiceProtocol) {
|
||||||
self.roomListService = roomListService
|
self.roomListService = roomListService
|
||||||
serialDispatchQueue = DispatchQueue(label: "io.element.elementx.roomsummaryprovider", qos: .default)
|
serialDispatchQueue = DispatchQueue(label: "io.element.elementx.roomsummaryprovider", qos: .default)
|
||||||
self.eventStringBuilder = eventStringBuilder
|
self.eventStringBuilder = eventStringBuilder
|
||||||
self.name = name
|
self.name = name
|
||||||
self.appSettings = appSettings
|
|
||||||
self.notificationSettings = notificationSettings
|
self.notificationSettings = notificationSettings
|
||||||
self.backgroundTaskService = backgroundTaskService
|
self.backgroundTaskService = backgroundTaskService
|
||||||
|
|
||||||
@ -74,9 +71,7 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
|||||||
.sink { [weak self] in self?.updateRoomsWithDiffs($0) }
|
.sink { [weak self] in self?.updateRoomsWithDiffs($0) }
|
||||||
.store(in: &cancellables)
|
.store(in: &cancellables)
|
||||||
|
|
||||||
if appSettings.notificationSettingsEnabled {
|
setupNotificationSettingsSubscription()
|
||||||
setupNotificationSettingsSubscription()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func setRoomList(_ roomList: RoomList) {
|
func setRoomList(_ roomList: RoomList) {
|
||||||
|
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomDetailsScreen.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomDetailsScreen.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomDetailsScreenDmDetails.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomDetailsScreenDmDetails.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomDetailsScreenWithEmptyTopic.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomDetailsScreenWithEmptyTopic.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomDetailsScreenWithInvite.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomDetailsScreenWithInvite.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomDetailsScreenWithRoomAvatar.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.roomDetailsScreenWithRoomAvatar.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.settings.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.settings.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.userSessionScreen-1.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.userSessionScreen-1.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomDetailsScreen.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomDetailsScreen.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomDetailsScreenDmDetails.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomDetailsScreenDmDetails.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomDetailsScreenWithEmptyTopic.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomDetailsScreenWithEmptyTopic.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomDetailsScreenWithInvite.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomDetailsScreenWithInvite.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomDetailsScreenWithRoomAvatar.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.roomDetailsScreenWithRoomAvatar.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.settings.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.settings.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.userSessionScreen-1.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.userSessionScreen-1.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomDetailsScreen.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomDetailsScreen.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomDetailsScreenDmDetails.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomDetailsScreenDmDetails.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomDetailsScreenWithEmptyTopic.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomDetailsScreenWithEmptyTopic.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomDetailsScreenWithInvite.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomDetailsScreenWithInvite.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomDetailsScreenWithRoomAvatar.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.roomDetailsScreenWithRoomAvatar.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.settings.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.settings.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.userSessionScreen-1.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.userSessionScreen-1.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomDetailsScreen.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomDetailsScreen.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomDetailsScreenDmDetails.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomDetailsScreenDmDetails.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomDetailsScreenWithEmptyTopic.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomDetailsScreenWithEmptyTopic.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomDetailsScreenWithInvite.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomDetailsScreenWithInvite.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomDetailsScreenWithRoomAvatar.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.roomDetailsScreenWithRoomAvatar.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.settings.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.settings.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.userSessionScreen-1.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.userSessionScreen-1.png
(Stored with Git LFS)
Binary file not shown.
@ -34,8 +34,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
roomProxy: roomProxyMock,
|
roomProxy: roomProxyMock,
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: notificationSettingsProxyMock,
|
notificationSettingsProxy: notificationSettingsProxyMock)
|
||||||
appSettings: AppSettings())
|
|
||||||
|
|
||||||
AppSettings.reset()
|
AppSettings.reset()
|
||||||
}
|
}
|
||||||
@ -47,8 +46,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
roomProxy: roomProxyMock,
|
roomProxy: roomProxyMock,
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||||
appSettings: AppSettings())
|
|
||||||
let deferred = deferFulfillment(context.$viewState.collect(2).first())
|
let deferred = deferFulfillment(context.$viewState.collect(2).first())
|
||||||
context.send(viewAction: .processTapLeave)
|
context.send(viewAction: .processTapLeave)
|
||||||
let states = try await deferred.fulfill()
|
let states = try await deferred.fulfill()
|
||||||
@ -65,8 +63,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
roomProxy: roomProxyMock,
|
roomProxy: roomProxyMock,
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||||
appSettings: AppSettings())
|
|
||||||
let deferred = deferFulfillment(context.$viewState.collect(2).first())
|
let deferred = deferFulfillment(context.$viewState.collect(2).first())
|
||||||
context.send(viewAction: .processTapLeave)
|
context.send(viewAction: .processTapLeave)
|
||||||
let states = try await deferred.fulfill()
|
let states = try await deferred.fulfill()
|
||||||
@ -123,8 +120,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
roomProxy: roomProxyMock,
|
roomProxy: roomProxyMock,
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||||
appSettings: AppSettings())
|
|
||||||
await context.nextViewState()
|
await context.nextViewState()
|
||||||
XCTAssertEqual(context.viewState.dmRecipient, RoomMemberDetails(withProxy: recipient))
|
XCTAssertEqual(context.viewState.dmRecipient, RoomMemberDetails(withProxy: recipient))
|
||||||
}
|
}
|
||||||
@ -141,8 +137,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
roomProxy: roomProxyMock,
|
roomProxy: roomProxyMock,
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||||
appSettings: AppSettings())
|
|
||||||
await context.nextViewState()
|
await context.nextViewState()
|
||||||
XCTAssertEqual(context.viewState.dmRecipient, RoomMemberDetails(withProxy: recipient))
|
XCTAssertEqual(context.viewState.dmRecipient, RoomMemberDetails(withProxy: recipient))
|
||||||
|
|
||||||
@ -168,8 +163,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
roomProxy: roomProxyMock,
|
roomProxy: roomProxyMock,
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||||
appSettings: AppSettings())
|
|
||||||
await context.nextViewState()
|
await context.nextViewState()
|
||||||
XCTAssertEqual(context.viewState.dmRecipient, RoomMemberDetails(withProxy: recipient))
|
XCTAssertEqual(context.viewState.dmRecipient, RoomMemberDetails(withProxy: recipient))
|
||||||
|
|
||||||
@ -196,8 +190,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
roomProxy: roomProxyMock,
|
roomProxy: roomProxyMock,
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||||
appSettings: AppSettings())
|
|
||||||
await context.nextViewState()
|
await context.nextViewState()
|
||||||
XCTAssertEqual(context.viewState.dmRecipient, RoomMemberDetails(withProxy: recipient))
|
XCTAssertEqual(context.viewState.dmRecipient, RoomMemberDetails(withProxy: recipient))
|
||||||
|
|
||||||
@ -223,8 +216,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
roomProxy: roomProxyMock,
|
roomProxy: roomProxyMock,
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||||
appSettings: AppSettings())
|
|
||||||
await context.nextViewState()
|
await context.nextViewState()
|
||||||
XCTAssertEqual(context.viewState.dmRecipient, RoomMemberDetails(withProxy: recipient))
|
XCTAssertEqual(context.viewState.dmRecipient, RoomMemberDetails(withProxy: recipient))
|
||||||
|
|
||||||
@ -250,8 +242,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
roomProxy: roomProxyMock,
|
roomProxy: roomProxyMock,
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||||
appSettings: AppSettings())
|
|
||||||
|
|
||||||
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
||||||
|
|
||||||
@ -265,8 +256,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
roomProxy: roomProxyMock,
|
roomProxy: roomProxyMock,
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||||
appSettings: AppSettings())
|
|
||||||
|
|
||||||
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
||||||
|
|
||||||
@ -295,8 +285,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
roomProxy: roomProxyMock,
|
roomProxy: roomProxyMock,
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||||
appSettings: AppSettings())
|
|
||||||
|
|
||||||
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
||||||
|
|
||||||
@ -314,8 +303,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
roomProxy: roomProxyMock,
|
roomProxy: roomProxyMock,
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||||
appSettings: AppSettings())
|
|
||||||
|
|
||||||
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
||||||
|
|
||||||
@ -333,8 +321,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
roomProxy: roomProxyMock,
|
roomProxy: roomProxyMock,
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||||
appSettings: AppSettings())
|
|
||||||
|
|
||||||
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
||||||
|
|
||||||
@ -352,8 +339,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
roomProxy: roomProxyMock,
|
roomProxy: roomProxyMock,
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||||
appSettings: AppSettings())
|
|
||||||
|
|
||||||
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
||||||
|
|
||||||
@ -370,8 +356,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
roomProxy: roomProxyMock,
|
roomProxy: roomProxyMock,
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||||
appSettings: AppSettings())
|
|
||||||
|
|
||||||
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
||||||
|
|
||||||
@ -386,8 +371,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
|||||||
roomProxy: roomProxyMock,
|
roomProxy: roomProxyMock,
|
||||||
mediaProvider: MockMediaProvider(),
|
mediaProvider: MockMediaProvider(),
|
||||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||||
notificationSettingsProxy: notificationSettingsProxyMock,
|
notificationSettingsProxy: notificationSettingsProxyMock)
|
||||||
appSettings: AppSettings())
|
|
||||||
let deferred = deferFulfillment(context.$viewState.map(\.notificationSettingsState)
|
let deferred = deferFulfillment(context.$viewState.map(\.notificationSettingsState)
|
||||||
.filter(\.isError)
|
.filter(\.isError)
|
||||||
.first())
|
.first())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user