mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Remove notification settings feature flag (#1693)
This commit is contained in:
@@ -37,7 +37,6 @@ final class AppSettings {
|
||||
case userSuggestionsEnabled
|
||||
case readReceiptsEnabled
|
||||
case hasShownWelcomeScreen
|
||||
case notificationSettingsEnabled
|
||||
case swiftUITimelineEnabled
|
||||
case richTextEditorEnabled
|
||||
}
|
||||
@@ -236,9 +235,6 @@ final class AppSettings {
|
||||
@UserPreference(key: UserDefaultsKeys.readReceiptsEnabled, defaultValue: false, storageType: .userDefaults(store))
|
||||
var readReceiptsEnabled
|
||||
|
||||
@UserPreference(key: UserDefaultsKeys.notificationSettingsEnabled, defaultValue: false, storageType: .userDefaults(store))
|
||||
var notificationSettingsEnabled
|
||||
|
||||
@UserPreference(key: UserDefaultsKeys.swiftUITimelineEnabled, defaultValue: false, storageType: .volatile)
|
||||
var swiftUITimelineEnabled
|
||||
|
||||
|
||||
@@ -268,7 +268,7 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
||||
private func buildRoom(with details: RoomSummaryDetails, invalidated: Bool) -> HomeScreenRoom {
|
||||
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,
|
||||
roomId: details.id,
|
||||
|
||||
@@ -54,8 +54,7 @@ final class RoomDetailsScreenCoordinator: CoordinatorProtocol {
|
||||
roomProxy: parameters.roomProxy,
|
||||
mediaProvider: parameters.mediaProvider,
|
||||
userIndicatorController: parameters.userIndicatorController,
|
||||
notificationSettingsProxy: parameters.notificationSettings,
|
||||
appSettings: ServiceLocator.shared.settings)
|
||||
notificationSettingsProxy: parameters.notificationSettings)
|
||||
}
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
@@ -48,7 +48,6 @@ struct RoomDetailsScreenViewState: BindableState {
|
||||
var canEditRoomName = false
|
||||
var canEditRoomTopic = false
|
||||
var canEditRoomAvatar = false
|
||||
let showNotificationSettings: Bool
|
||||
var notificationSettingsState: RoomDetailsNotificationSettingsState = .loading
|
||||
|
||||
var canEdit: Bool {
|
||||
@@ -64,10 +63,7 @@ struct RoomDetailsScreenViewState: BindableState {
|
||||
var dmRecipient: RoomMemberDetails?
|
||||
|
||||
var shortcuts: [RoomDetailsScreenViewShortcut] {
|
||||
var shortcuts: [RoomDetailsScreenViewShortcut] = []
|
||||
if showNotificationSettings {
|
||||
shortcuts.append(.mute)
|
||||
}
|
||||
var shortcuts: [RoomDetailsScreenViewShortcut] = [.mute]
|
||||
if let permalink = dmRecipient?.permalink {
|
||||
shortcuts.append(.share(link: permalink))
|
||||
} else if let permalink {
|
||||
|
||||
@@ -38,8 +38,7 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
|
||||
roomProxy: RoomProxyProtocol,
|
||||
mediaProvider: MediaProviderProtocol,
|
||||
userIndicatorController: UserIndicatorControllerProtocol,
|
||||
notificationSettingsProxy: NotificationSettingsProxyProtocol,
|
||||
appSettings: AppSettings) {
|
||||
notificationSettingsProxy: NotificationSettingsProxyProtocol) {
|
||||
self.accountUserID = accountUserID
|
||||
self.roomProxy = roomProxy
|
||||
self.mediaProvider = mediaProvider
|
||||
@@ -55,7 +54,6 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
|
||||
topic: roomProxy.topic,
|
||||
avatarURL: roomProxy.avatarURL,
|
||||
joinedMembersCount: roomProxy.joinedMembersCount,
|
||||
showNotificationSettings: appSettings.notificationSettingsEnabled,
|
||||
notificationSettingsState: .loading,
|
||||
bindings: .init()),
|
||||
imageProvider: mediaProvider)
|
||||
|
||||
@@ -32,9 +32,7 @@ struct RoomDetailsScreen: View {
|
||||
|
||||
topicSection
|
||||
|
||||
if context.viewState.showNotificationSettings {
|
||||
notificationSection
|
||||
}
|
||||
notificationSection
|
||||
|
||||
if context.viewState.dmRecipient == nil {
|
||||
aboutSection
|
||||
@@ -277,14 +275,12 @@ struct RoomDetailsScreen_Previews: PreviewProvider {
|
||||
notificationSettingsProxyMockConfiguration.roomMode.isDefault = false
|
||||
let notificationSettingsProxy = NotificationSettingsProxyMock(with: notificationSettingsProxyMockConfiguration)
|
||||
let appSettings = AppSettings()
|
||||
appSettings.notificationSettingsEnabled = true
|
||||
|
||||
return RoomDetailsScreenViewModel(accountUserID: "@owner:somewhere.com",
|
||||
roomProxy: roomProxy,
|
||||
mediaProvider: MockMediaProvider(),
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||
notificationSettingsProxy: notificationSettingsProxy,
|
||||
appSettings: appSettings)
|
||||
notificationSettingsProxy: notificationSettingsProxy)
|
||||
}()
|
||||
|
||||
static let dmRoomViewModel = {
|
||||
@@ -307,8 +303,7 @@ struct RoomDetailsScreen_Previews: PreviewProvider {
|
||||
roomProxy: roomProxy,
|
||||
mediaProvider: MockMediaProvider(),
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||
notificationSettingsProxy: notificationSettingsProxy,
|
||||
appSettings: appSettings)
|
||||
notificationSettingsProxy: notificationSettingsProxy)
|
||||
}()
|
||||
|
||||
static let simpleRoomViewModel = {
|
||||
@@ -328,8 +323,7 @@ struct RoomDetailsScreen_Previews: PreviewProvider {
|
||||
roomProxy: roomProxy,
|
||||
mediaProvider: MockMediaProvider(),
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||
notificationSettingsProxy: notificationSettingsProxy,
|
||||
appSettings: appSettings)
|
||||
notificationSettingsProxy: notificationSettingsProxy)
|
||||
}()
|
||||
|
||||
static var previews: some View {
|
||||
|
||||
-1
@@ -48,7 +48,6 @@ protocol DeveloperOptionsProtocol: AnyObject {
|
||||
var shouldCollapseRoomStateEvents: Bool { get set }
|
||||
var userSuggestionsEnabled: Bool { get set }
|
||||
var readReceiptsEnabled: Bool { get set }
|
||||
var notificationSettingsEnabled: Bool { get set }
|
||||
var swiftUITimelineEnabled: Bool { get set }
|
||||
var richTextEditorEnabled: Bool { get set }
|
||||
}
|
||||
|
||||
-7
@@ -47,13 +47,6 @@ struct DeveloperOptionsScreen: View {
|
||||
}
|
||||
}
|
||||
|
||||
Section("Notifications") {
|
||||
Toggle(isOn: $context.notificationSettingsEnabled) {
|
||||
Text("Show notification settings")
|
||||
Text("Requires app reboot")
|
||||
}
|
||||
}
|
||||
|
||||
Section("Room creation") {
|
||||
Toggle(isOn: $context.userSuggestionsEnabled) {
|
||||
Text("User suggestions")
|
||||
|
||||
@@ -37,7 +37,6 @@ struct SettingsScreenViewState: BindableState {
|
||||
var userAvatarURL: URL?
|
||||
var userDisplayName: String?
|
||||
var showSessionVerificationSection: Bool
|
||||
var showNotificationSettings: Bool
|
||||
var showDeveloperOptions: Bool
|
||||
|
||||
/// The presentation anchor used to display the OIDC account URL.
|
||||
|
||||
@@ -41,7 +41,6 @@ class SettingsScreenViewModel: SettingsScreenViewModelType, SettingsScreenViewMo
|
||||
userID: userSession.userID,
|
||||
accountURL: userSession.clientProxy.accountURL,
|
||||
showSessionVerificationSection: showSessionVerificationSection,
|
||||
showNotificationSettings: appSettings.notificationSettingsEnabled,
|
||||
showDeveloperOptions: appSettings.canShowDeveloperOptions),
|
||||
imageProvider: userSession.mediaProvider)
|
||||
|
||||
@@ -52,11 +51,7 @@ class SettingsScreenViewModel: SettingsScreenViewModelType, SettingsScreenViewMo
|
||||
userSession.clientProxy.avatarURLPublisher
|
||||
.weakAssign(to: \.state.userAvatarURL, on: self)
|
||||
.store(in: &cancellables)
|
||||
|
||||
appSettings.$notificationSettingsEnabled
|
||||
.weakAssign(to: \.state.showNotificationSettings, on: self)
|
||||
.store(in: &cancellables)
|
||||
|
||||
|
||||
Task {
|
||||
await userSession.clientProxy.loadUserAvatarURL()
|
||||
}
|
||||
|
||||
@@ -124,14 +124,12 @@ struct SettingsScreen: View {
|
||||
}
|
||||
|
||||
// Notifications
|
||||
if context.viewState.showNotificationSettings {
|
||||
ListRow(label: .default(title: L10n.screenNotificationSettingsTitle,
|
||||
systemIcon: .bell),
|
||||
kind: .navigationLink {
|
||||
context.send(viewAction: .notifications)
|
||||
})
|
||||
.accessibilityIdentifier(A11yIdentifiers.settingsScreen.notifications)
|
||||
}
|
||||
ListRow(label: .default(title: L10n.screenNotificationSettingsTitle,
|
||||
systemIcon: .bell),
|
||||
kind: .navigationLink {
|
||||
context.send(viewAction: .notifications)
|
||||
})
|
||||
.accessibilityIdentifier(A11yIdentifiers.settingsScreen.notifications)
|
||||
|
||||
// Analytics
|
||||
ListRow(label: .default(title: L10n.commonAnalytics,
|
||||
@@ -225,7 +223,6 @@ struct SettingsScreen_Previews: PreviewProvider {
|
||||
deviceID: "AAAAAAAAAAA",
|
||||
accountURL: "https://matrix.org/account"),
|
||||
mediaProvider: MockMediaProvider())
|
||||
ServiceLocator.shared.settings.notificationSettingsEnabled = true
|
||||
return SettingsScreenViewModel(userSession: userSession,
|
||||
appSettings: ServiceLocator.shared.settings)
|
||||
}()
|
||||
|
||||
@@ -405,7 +405,6 @@ class ClientProxy: ClientProxyProtocol {
|
||||
roomSummaryProvider = RoomSummaryProvider(roomListService: roomListService,
|
||||
eventStringBuilder: eventStringBuilder,
|
||||
name: "AllRooms",
|
||||
appSettings: appSettings,
|
||||
notificationSettings: notificationSettings,
|
||||
backgroundTaskService: backgroundTaskService)
|
||||
try await roomSummaryProvider?.setRoomList(roomListService.allRooms())
|
||||
@@ -413,7 +412,6 @@ class ClientProxy: ClientProxyProtocol {
|
||||
inviteSummaryProvider = RoomSummaryProvider(roomListService: roomListService,
|
||||
eventStringBuilder: eventStringBuilder,
|
||||
name: "Invites",
|
||||
appSettings: appSettings,
|
||||
notificationSettings: notificationSettings,
|
||||
backgroundTaskService: backgroundTaskService)
|
||||
try await inviteSummaryProvider?.setRoomList(roomListService.invites())
|
||||
|
||||
@@ -22,7 +22,6 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
||||
private let roomListService: RoomListServiceProtocol
|
||||
private let eventStringBuilder: RoomEventStringBuilder
|
||||
private let name: String
|
||||
private var appSettings: AppSettings
|
||||
private let notificationSettings: NotificationSettingsProxyProtocol
|
||||
private let backgroundTaskService: BackgroundTaskServiceProtocol
|
||||
|
||||
@@ -58,14 +57,12 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
||||
init(roomListService: RoomListServiceProtocol,
|
||||
eventStringBuilder: RoomEventStringBuilder,
|
||||
name: String,
|
||||
appSettings: AppSettings,
|
||||
notificationSettings: NotificationSettingsProxyProtocol,
|
||||
backgroundTaskService: BackgroundTaskServiceProtocol) {
|
||||
self.roomListService = roomListService
|
||||
serialDispatchQueue = DispatchQueue(label: "io.element.elementx.roomsummaryprovider", qos: .default)
|
||||
self.eventStringBuilder = eventStringBuilder
|
||||
self.name = name
|
||||
self.appSettings = appSettings
|
||||
self.notificationSettings = notificationSettings
|
||||
self.backgroundTaskService = backgroundTaskService
|
||||
|
||||
@@ -74,9 +71,7 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
||||
.sink { [weak self] in self?.updateRoomsWithDiffs($0) }
|
||||
.store(in: &cancellables)
|
||||
|
||||
if appSettings.notificationSettingsEnabled {
|
||||
setupNotificationSettingsSubscription()
|
||||
}
|
||||
setupNotificationSettingsSubscription()
|
||||
}
|
||||
|
||||
func setRoomList(_ roomList: RoomList) {
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:274bb0078f8a151058043897f4e7bcb77e829707e8c79881e6055b9bbed6a9c1
|
||||
size 92437
|
||||
oid sha256:1ad49c2d88bc1984b710b321481828dda71a962dfcf11b90b2da4d7870e9a6b2
|
||||
size 106363
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a7764e39c3df507246e0312e4d65dbf1eee09486e69b8d2aee1d86b6c3632173
|
||||
size 107609
|
||||
oid sha256:6ea76f09c518013c51a60a6907d6df7c11b774c8ce8f2e19719cfffe73fa37ff
|
||||
size 119954
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b8b39f26310f411a198277dd56c86d697d1fc2a1c481de578bd9a22306881125
|
||||
size 110753
|
||||
oid sha256:83881fdbc2208c211ca1fce3ec71b5a4db809581e6d6a5019de691aee94c2143
|
||||
size 122667
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5c0dd4d17f991a4b85159f9443a29c3174672a2c4a283cb6f99c74507d80267c
|
||||
size 97920
|
||||
oid sha256:8c7f944dd4213ea07885e3bf37a055c95151676933a435720fd0dbd1a75158b7
|
||||
size 111882
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dc84e5329532d7ceb2bd86ed36f92a81e8351f1de261496762f83cbb259b8b7a
|
||||
size 115979
|
||||
oid sha256:a22b15630bfb076b2b3e185a36d5e9faee749c27cfcfb55870df0678da1e7d0e
|
||||
size 127591
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:def07d1e06e120aee1988eae5212f018be8437aa24044941c9b6b8db58d2324a
|
||||
size 119392
|
||||
oid sha256:f20481300c914fe13fb7e3fdf1fa717eaa6020bfd8ed60a72e08d13c31e4268d
|
||||
size 125054
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:688cb467fc96dfff19c39075cf9a87159c64d02ae5e556a9fe902f9332dcba7a
|
||||
size 144003
|
||||
oid sha256:20f6abde898f96b22d8e7e8032050ab2760a39c6508a0a3c31185eeea99fc12d
|
||||
size 151262
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8d6b82a9efbadb6843638223aa096ae2c4236a915e7c4f2fab4c88f28d235b43
|
||||
size 114023
|
||||
oid sha256:ffde28c0f042f7cfc608666845fb3fe1cf7c5240597a06a7465279b023034991
|
||||
size 130532
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:90aefb602146db2b9b35e1d48f5fe1fa6158f5fc9e610685764a0951e7488a39
|
||||
size 136987
|
||||
oid sha256:9551f149c3ce1e4ab2e6f5c54a71686a3b0b1277ec61890e254eebabfdb4ae80
|
||||
size 146451
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a0f44c495b3cf91392ca144a313c991871f3f4a3c015a5493abe2fb1d42c8823
|
||||
size 139719
|
||||
oid sha256:4480035eb9a3d13af063f3abd1bc4cbd4dc39b28aa58d4cf8b3f07d3525a6c1f
|
||||
size 148071
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5c2b8fd204bd3615c4d099768079a3fae28acc3f8c0668b4b3570f2d30f81226
|
||||
size 122067
|
||||
oid sha256:e947a5a3b6fadba3465f5eaa739da96375545872b0dd363c690ef6f9834ba8e4
|
||||
size 140774
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0b709af1401cfca7e76e8d5775db127d794beb7b5a0b816a78ebed8bdb2cca89
|
||||
size 148719
|
||||
oid sha256:aea2234bd284c4c88d4c04522676f56c8c081647c5f71bff7c8bb70742268b38
|
||||
size 157599
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:79777f9421513a5d387bb3cc54ac35da75a8c3a1a6dafcaa064dbd9abe288ab7
|
||||
size 147694
|
||||
oid sha256:aaf929e8bdc8b03ebf11525500191824f1040dc8c121569dfc8595c3cb7fc28c
|
||||
size 157735
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e82f958962f07fce1075b72f9160e253989e2042a7707360ae28393a5544ccbc
|
||||
size 128129
|
||||
oid sha256:b5a26343548e891d430a329d959d3f9c307324d825acbf382c55c25f1172e384
|
||||
size 143645
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9d815b977d8be31b87684c610da757e2e8389ccc9e82070867f58337f2868227
|
||||
size 105200
|
||||
oid sha256:4ee0263916f4d46830d5baa235aa60b1e44609a6d453f4f0afbce2c54da75530
|
||||
size 120976
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4b390c1b74ec7f33edfbba06401d69667c4ed391ce6e042051440c82e5233792
|
||||
size 121126
|
||||
oid sha256:4d9a6895bbce62827d21912b71eed3bf688b6f639a9a789a1256e636250d3602
|
||||
size 134504
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1cc2e48c7ada9bb111857c7104b6ac106bb74568db73b38288cbc43d495880be
|
||||
size 125491
|
||||
oid sha256:8d0c404f34f3fd592ae188396953a5bf4a9d6d57892ec342f4be6f83a69d05bd
|
||||
size 138413
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7e35677f4a0c829478d54339f4937825fb54ac6bb9804a31e0a7ac9b34b9779d
|
||||
size 110976
|
||||
oid sha256:10638b4d909b868d9184537718542b542474ba0b216463248d03592b66774d0b
|
||||
size 126956
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:86d7ba9ce9b8745510e218f8b22a53e57f20459a7a50af2a0eb13eff7e8c80eb
|
||||
size 129148
|
||||
oid sha256:55eb4abacf1221513826cc4eeb80686e1d37715fc6d54777b034eff481e92f06
|
||||
size 142290
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d173fb278106eda74b32e617b00a62a69b5c37a15c4e0d948d24fc0459c5ec32
|
||||
size 126776
|
||||
oid sha256:9c5452c2d00c015a7b316fa4f46c266d549556239fc8532b53207d6f4c466dc0
|
||||
size 132686
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7b8c1a89fc960a9f62df4e2d67c7fc5ac35088772adb5b5621306457b7427942
|
||||
size 145836
|
||||
oid sha256:b8d2815692b4c377de488c93be321d51cdffa4604bba0c20d57876a40426368b
|
||||
size 154039
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:96bcf695cd1594d97b427b080d5055d2dcb408291277dc1302274dedc7b4ae9f
|
||||
size 143250
|
||||
oid sha256:2ca45d62287196bf84f4c1b2bda5db76f5adb91d6ed38759fbe32ff4e323e14d
|
||||
size 167170
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:14b719940a2d55d51291830227a0b9e9f7a5a5fe942a3ecc119407f40458398a
|
||||
size 169433
|
||||
oid sha256:07dfcb650d3e3f914d06f21b9b3dd51bd1f8f72763534235aca1dab03b1aae0a
|
||||
size 174124
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d721ab3fb80283367fb3b0573d223589197767e98d03da7d860b6107d59ee99b
|
||||
size 163565
|
||||
oid sha256:df89c61a27e2e74e0850fce3bbe7b37dae87fe9c57d78d3d54c0685b9dc4a9f3
|
||||
size 161800
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:658caaf88a93c43aa101978c0986f36a85e547c73103183708235896c6a509c5
|
||||
size 151764
|
||||
oid sha256:862c6810149dac38a50831e4043cc44222c206c5a455462e96fe6aecb70269ec
|
||||
size 171409
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ca7c609cdb53f3a73ad84aaa7237655a5eb1d485a5442afe763a654b2a0d3306
|
||||
size 178599
|
||||
oid sha256:5a38546ccbd7c851cc7e5dfd384ece0dd5a93e4943e6fea12d8b7dbd54d76bd3
|
||||
size 182010
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2b42fecf8963190981e3236a369bd1d601e6b6f7f1f9d3db17a9c5b2a3def601
|
||||
size 177000
|
||||
oid sha256:4f904c2bcde574050c25f62386c05084264928bc81d387a7b66ee7447bffea11
|
||||
size 187727
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e9c0cfe17aa68f760a3d79dd342ba4c123a3d34809a45735a26a3a2b752a3c73
|
||||
size 129721
|
||||
oid sha256:3bd6944ace15d71da90b5ea36a47da841c2c6d2fe1baf66f1141e65956b8d640
|
||||
size 147878
|
||||
|
||||
@@ -34,8 +34,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
||||
roomProxy: roomProxyMock,
|
||||
mediaProvider: MockMediaProvider(),
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||
notificationSettingsProxy: notificationSettingsProxyMock,
|
||||
appSettings: AppSettings())
|
||||
notificationSettingsProxy: notificationSettingsProxyMock)
|
||||
|
||||
AppSettings.reset()
|
||||
}
|
||||
@@ -47,8 +46,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
||||
roomProxy: roomProxyMock,
|
||||
mediaProvider: MockMediaProvider(),
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
appSettings: AppSettings())
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||
let deferred = deferFulfillment(context.$viewState.collect(2).first())
|
||||
context.send(viewAction: .processTapLeave)
|
||||
let states = try await deferred.fulfill()
|
||||
@@ -65,8 +63,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
||||
roomProxy: roomProxyMock,
|
||||
mediaProvider: MockMediaProvider(),
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
appSettings: AppSettings())
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||
let deferred = deferFulfillment(context.$viewState.collect(2).first())
|
||||
context.send(viewAction: .processTapLeave)
|
||||
let states = try await deferred.fulfill()
|
||||
@@ -123,8 +120,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
||||
roomProxy: roomProxyMock,
|
||||
mediaProvider: MockMediaProvider(),
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
appSettings: AppSettings())
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||
await context.nextViewState()
|
||||
XCTAssertEqual(context.viewState.dmRecipient, RoomMemberDetails(withProxy: recipient))
|
||||
}
|
||||
@@ -141,8 +137,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
||||
roomProxy: roomProxyMock,
|
||||
mediaProvider: MockMediaProvider(),
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
appSettings: AppSettings())
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||
await context.nextViewState()
|
||||
XCTAssertEqual(context.viewState.dmRecipient, RoomMemberDetails(withProxy: recipient))
|
||||
|
||||
@@ -168,8 +163,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
||||
roomProxy: roomProxyMock,
|
||||
mediaProvider: MockMediaProvider(),
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
appSettings: AppSettings())
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||
await context.nextViewState()
|
||||
XCTAssertEqual(context.viewState.dmRecipient, RoomMemberDetails(withProxy: recipient))
|
||||
|
||||
@@ -196,8 +190,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
||||
roomProxy: roomProxyMock,
|
||||
mediaProvider: MockMediaProvider(),
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
appSettings: AppSettings())
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||
await context.nextViewState()
|
||||
XCTAssertEqual(context.viewState.dmRecipient, RoomMemberDetails(withProxy: recipient))
|
||||
|
||||
@@ -223,8 +216,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
||||
roomProxy: roomProxyMock,
|
||||
mediaProvider: MockMediaProvider(),
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
appSettings: AppSettings())
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||
await context.nextViewState()
|
||||
XCTAssertEqual(context.viewState.dmRecipient, RoomMemberDetails(withProxy: recipient))
|
||||
|
||||
@@ -250,8 +242,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
||||
roomProxy: roomProxyMock,
|
||||
mediaProvider: MockMediaProvider(),
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
appSettings: AppSettings())
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||
|
||||
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
||||
|
||||
@@ -265,8 +256,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
||||
roomProxy: roomProxyMock,
|
||||
mediaProvider: MockMediaProvider(),
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
appSettings: AppSettings())
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||
|
||||
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
||||
|
||||
@@ -295,8 +285,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
||||
roomProxy: roomProxyMock,
|
||||
mediaProvider: MockMediaProvider(),
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
appSettings: AppSettings())
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||
|
||||
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
||||
|
||||
@@ -314,8 +303,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
||||
roomProxy: roomProxyMock,
|
||||
mediaProvider: MockMediaProvider(),
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
appSettings: AppSettings())
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||
|
||||
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
||||
|
||||
@@ -333,8 +321,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
||||
roomProxy: roomProxyMock,
|
||||
mediaProvider: MockMediaProvider(),
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
appSettings: AppSettings())
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||
|
||||
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
||||
|
||||
@@ -352,8 +339,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
||||
roomProxy: roomProxyMock,
|
||||
mediaProvider: MockMediaProvider(),
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
appSettings: AppSettings())
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||
|
||||
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
||||
|
||||
@@ -370,8 +356,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
||||
roomProxy: roomProxyMock,
|
||||
mediaProvider: MockMediaProvider(),
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
appSettings: AppSettings())
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()))
|
||||
|
||||
_ = await context.$viewState.debounce(for: .milliseconds(100), scheduler: DispatchQueue.main).values.first()
|
||||
|
||||
@@ -386,8 +371,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
||||
roomProxy: roomProxyMock,
|
||||
mediaProvider: MockMediaProvider(),
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||
notificationSettingsProxy: notificationSettingsProxyMock,
|
||||
appSettings: AppSettings())
|
||||
notificationSettingsProxy: notificationSettingsProxyMock)
|
||||
let deferred = deferFulfillment(context.$viewState.map(\.notificationSettingsState)
|
||||
.filter(\.isError)
|
||||
.first())
|
||||
|
||||
Reference in New Issue
Block a user