mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +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
@@ -94,7 +94,7 @@ struct RoomScreenViewState: BindableState {
|
||||
(canAcceptKnocks || canDeclineKnocks || canBan)
|
||||
}
|
||||
|
||||
/// If `enableKeyShareOnInvite` is set, determines the current history sharing state.
|
||||
/// The current history sharing state.
|
||||
var roomHistorySharingState: RoomHistorySharingState?
|
||||
|
||||
var footerDetails: RoomScreenFooterViewDetails?
|
||||
|
||||
@@ -67,18 +67,12 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
|
||||
self.initialSelectedPinnedEventID = initialSelectedPinnedEventID
|
||||
pinnedEventStringBuilder = .pinnedEventStringBuilder(userID: roomProxy.ownUserID)
|
||||
|
||||
let roomHistorySharingState: RoomHistorySharingState? = if appSettings.enableKeyShareOnInvite {
|
||||
roomProxy.infoPublisher.value.historySharingState
|
||||
} else {
|
||||
nil
|
||||
}
|
||||
|
||||
let viewState = RoomScreenViewState(roomTitle: roomProxy.infoPublisher.value.displayName ?? roomProxy.id,
|
||||
roomAvatar: roomProxy.infoPublisher.value.avatar,
|
||||
hasOngoingCall: roomProxy.infoPublisher.value.hasRoomCall,
|
||||
isDirectOneToOneRoom: roomProxy.isDirectOneToOneRoom,
|
||||
hasSuccessor: roomProxy.infoPublisher.value.successor != nil,
|
||||
roomHistorySharingState: roomHistorySharingState)
|
||||
roomHistorySharingState: roomProxy.infoPublisher.value.historySharingState)
|
||||
super.init(initialViewState: appHooks.roomScreenHook.update(viewState),
|
||||
mediaProvider: userSession.mediaProvider)
|
||||
|
||||
@@ -371,13 +365,7 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
|
||||
state.canBan = powerLevels.canOwnUserBan()
|
||||
}
|
||||
|
||||
// This causes the UI to become inconsistent with the user's mental model if the user
|
||||
// does not restart the app after disabling the feature flag. We can probably ignore
|
||||
// such cases, since we explicitly ask for an app restart in the caption of the feature
|
||||
// flag switch.
|
||||
if appSettings.enableKeyShareOnInvite {
|
||||
state.roomHistorySharingState = roomInfo.historySharingState
|
||||
}
|
||||
state.roomHistorySharingState = roomInfo.historySharingState
|
||||
}
|
||||
|
||||
private func setupPinnedEventsTimelineItemProviderIfNeeded() {
|
||||
|
||||
Reference in New Issue
Block a user