Allow replying to any remote message in a thread (#5201)

* Allow replying to any remote message in a thread.

This will open the thread screen based on the selected event:

- If it was already part of a thread, it will open that thread.
- Otherwise, it'll open the thread timeline screen so you can start a thread from the event.

* Add the feature flag to decide which action to perform. Also, rename the feature flag to something easier to understand.

* Display the reply in thread action based on the feature flag too

---------

Co-authored-by: ElementBot <android@element.io>
This commit is contained in:
Jorge Martin Espinosa 2025-08-22 16:07:13 +02:00 committed by GitHub
parent d97b2ab79c
commit 7a5a197e7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 290 additions and 17 deletions

View file

@ -132,7 +132,7 @@ class RustMatrixClientFactory @Inject constructor(
)
)
.enableShareHistoryOnInvite(featureFlagService.isFeatureEnabled(FeatureFlags.EnableKeyShareOnInvite))
.threadsEnabled(featureFlagService.isFeatureEnabled(FeatureFlags.HideThreadedEvents), threadSubscriptions = false)
.threadsEnabled(featureFlagService.isFeatureEnabled(FeatureFlags.Threads), threadSubscriptions = false)
.run {
// Apply sliding sync version settings
when (slidingSyncType) {

View file

@ -156,7 +156,7 @@ class JoinedRustRoom(
override suspend fun createTimeline(
createTimelineParams: CreateTimelineParams,
): Result<Timeline> = withContext(roomDispatcher) {
val hideThreadedEvents = featureFlagService.isFeatureEnabled(FeatureFlags.HideThreadedEvents)
val hideThreadedEvents = featureFlagService.isFeatureEnabled(FeatureFlags.Threads)
val focus = when (createTimelineParams) {
is CreateTimelineParams.PinnedOnly -> TimelineFocus.PinnedEvents(
maxEventsToLoad = 100u,

View file

@ -108,7 +108,7 @@ class RustRoomFactory(
val sdkRoom = awaitRoomInRoomList(roomId) ?: return@withContext null
if (sdkRoom.membership() == Membership.JOINED) {
val hideThreadedEvents = featureFlagService.isFeatureEnabled(FeatureFlags.HideThreadedEvents)
val hideThreadedEvents = featureFlagService.isFeatureEnabled(FeatureFlags.Threads)
// Init the live timeline in the SDK from the Room
val timeline = sdkRoom.timelineWithConfiguration(
TimelineConfiguration(