Promote "history sharing on invite" out of developer options (#6647)

* Enable history sharing by default, unconditionally

* Remove feature-flag dep from history viz icons in room header

* Remove feature-flag dep from warning on inviting new people

* Remove feature-flag dep from warning on starting chat with new people

* Remove `enableKeyShareOnInvite` feature flag

* Update screenshots

* Remove redundant `FakeFeatureFlagService()` invocation, per review comment

---------

Co-authored-by: ElementBot <android@element.io>
This commit is contained in:
Richard van der Hoff 2026-04-24 11:52:21 +01:00 committed by GitHub
parent 92ee479e91
commit 289dfff50a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
63 changed files with 106 additions and 206 deletions

View file

@ -217,12 +217,10 @@ class MessagesPresenter(
val dmRoomMember by room.getDirectRoomMember(membersState)
val roomMemberIdentityStateChanges = identityChangeState.roomMemberIdentityStateChanges
val isKeyShareOnInviteEnabled by featureFlagService.isFeatureEnabledFlow(FeatureFlags.EnableKeyShareOnInvite).collectAsState(initial = false)
// The top bar should show a "history" icon if:
// * History sharing is enabled,
// * The room is encrypted, and:
// * The room's history_visibility allows future users to see content.
val topBarSharedHistoryIcon = if (isKeyShareOnInviteEnabled) roomInfo.sharedHistoryIcon() else SharedHistoryIcon.NONE
val topBarSharedHistoryIcon = roomInfo.sharedHistoryIcon()
LifecycleResumeEffect(dmRoomMember, roomInfo.isEncrypted) {
if (roomInfo.isEncrypted == true) {

View file

@ -1228,9 +1228,6 @@ class MessagesPresenterTest {
initialRoomInfo = aRoomInfo(isEncrypted = true, historyVisibility = RoomHistoryVisibility.Shared),
),
),
featureFlagService = FakeFeatureFlagService(
initialState = mapOf(FeatureFlags.EnableKeyShareOnInvite.key to true)
)
)
presenter.testWithLifecycleOwner {
awaitItem()
@ -1249,9 +1246,6 @@ class MessagesPresenterTest {
initialRoomInfo = aRoomInfo(isEncrypted = true, historyVisibility = RoomHistoryVisibility.WorldReadable),
),
),
featureFlagService = FakeFeatureFlagService(
initialState = mapOf(FeatureFlags.EnableKeyShareOnInvite.key to true)
)
)
presenter.testWithLifecycleOwner {
awaitItem()