mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Promote "history sharing on invite" out of developer options (#5480)
* Enable key-share-on-invite irrespective of feature flag * Remove feature-flag dep: warning on starting chat with new people * Remove feature-flag dep: invite from room member details * Remove feature-flag dep: warning on new users in invite screen * Remove feature-flag dep: from room details screen * Remove feature-flag dep: starting chat from user profile screen * Remove feature-flag dep: timeline info on forwarded keys * Remove feature-flag dep: RoomScreenModel * Remove `enableKeyShareOnInvite` from AppSettings * Remove `enableKeyShareOnInvite` feature flag * Remove outdated comments * Update preview test room snapshots as their header now includes the history sharing icon
This commit is contained in:
committed by
GitHub
parent
eb72815e74
commit
9a2a852af3
@@ -791,34 +791,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
// MARK: - History Sharing
|
||||
|
||||
@Test
|
||||
mutating func historySharingPillDoesNotAppearIfFeatureFlagNotSet() async throws {
|
||||
ServiceLocator.shared.settings.enableKeyShareOnInvite = false
|
||||
|
||||
let configuration = JoinedRoomProxyMockConfiguration(historyVisibility: .shared)
|
||||
let infoSubject = CurrentValueSubject<RoomInfoProxyProtocol, Never>(RoomInfoProxyMock(configuration))
|
||||
let roomProxyMock = JoinedRoomProxyMock(configuration)
|
||||
roomProxyMock.underlyingInfoPublisher = infoSubject.asCurrentValuePublisher()
|
||||
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: ServiceLocator.shared.analytics,
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController,
|
||||
notificationSettingsProxy: notificationSettingsProxyMock,
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
appSettings: ServiceLocator.shared.settings)
|
||||
|
||||
let deferredInvisible = deferFailure(context.observe(\.viewState),
|
||||
timeout: .seconds(1),
|
||||
message: "The pill should not be shown as the feature flag is not set") { state in
|
||||
state.details.historySharingState != nil
|
||||
}
|
||||
try await deferredInvisible.fulfill()
|
||||
}
|
||||
|
||||
@Test
|
||||
mutating func historySharingPillDisplayedIfHistoryVisibilityShared() async throws {
|
||||
ServiceLocator.shared.settings.enableKeyShareOnInvite = true
|
||||
|
||||
mutating func historySharingPillDisplayed() async throws {
|
||||
let configuration = JoinedRoomProxyMockConfiguration(historyVisibility: .shared)
|
||||
let infoSubject = CurrentValueSubject<RoomInfoProxyProtocol, Never>(RoomInfoProxyMock(configuration))
|
||||
let roomProxyMock = JoinedRoomProxyMock(configuration)
|
||||
|
||||
Reference in New Issue
Block a user