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 b17388d686
commit e961214c4d
63 changed files with 106 additions and 206 deletions

View file

@ -168,8 +168,6 @@ class RoomDetailsPresenter(
val canReportRoom by produceState(false) { value = client.canReportRoom() }
val enableKeyShareOnInvite by featureFlagService.isFeatureEnabledFlow(FeatureFlags.EnableKeyShareOnInvite).collectAsState(initial = false)
return RoomDetailsState(
roomId = room.roomId,
roomName = roomName,
@ -199,7 +197,6 @@ class RoomDetailsPresenter(
isTombstoned = roomInfo.successorRoom != null,
showDebugInfo = isDeveloperModeEnabled,
roomVersion = roomInfo.roomVersion,
enableKeyShareOnInvite = enableKeyShareOnInvite,
roomHistoryVisibility = roomInfo.historyVisibility,
eventSink = ::handleEvent,
)

View file

@ -51,7 +51,6 @@ data class RoomDetailsState(
val isTombstoned: Boolean,
val showDebugInfo: Boolean,
val roomVersion: String?,
val enableKeyShareOnInvite: Boolean,
val roomHistoryVisibility: RoomHistoryVisibility,
val eventSink: (RoomDetailsEvent) -> Unit
) {
@ -64,7 +63,7 @@ data class RoomDetailsState(
if (isPublic) {
add(RoomBadge.PUBLIC)
}
if (enableKeyShareOnInvite && isEncrypted) {
if (isEncrypted) {
when (roomHistoryVisibility) {
RoomHistoryVisibility.Invited, RoomHistoryVisibility.Joined -> add(RoomBadge.SHARED_HISTORY_HIDDEN)
RoomHistoryVisibility.Shared -> add(RoomBadge.SHARED_HISTORY_SHARED)

View file

@ -121,7 +121,6 @@ fun aRoomDetailsState(
canReportRoom: Boolean = true,
isTombstoned: Boolean = false,
showDebugInfo: Boolean = false,
enableKeyShareOnInvite: Boolean = false,
roomHistoryVisibility: RoomHistoryVisibility = RoomHistoryVisibility.Shared,
eventSink: (RoomDetailsEvent) -> Unit = {},
) = RoomDetailsState(
@ -153,7 +152,6 @@ fun aRoomDetailsState(
isTombstoned = isTombstoned,
showDebugInfo = showDebugInfo,
roomVersion = "12",
enableKeyShareOnInvite = enableKeyShareOnInvite,
roomHistoryVisibility = roomHistoryVisibility,
eventSink = eventSink,
)
@ -195,6 +193,5 @@ fun aSharedHistoryRoomDetailsState(
roomHistoryVisibility: RoomHistoryVisibility
) = aRoomDetailsState(
isEncrypted = true,
enableKeyShareOnInvite = true,
roomHistoryVisibility = roomHistoryVisibility,
)