Make sure we don't finish NotificationTapOpensTimeline until we've actually rendered the timeline event we need to focus on

This commit is contained in:
Jorge Martín 2025-11-28 08:25:26 +01:00 committed by Jorge Martin Espinosa
parent c6e0686dec
commit f265a47243

View file

@ -206,6 +206,9 @@ class TimelinePresenter(
focusOnEvent(event.eventId, focusRequestState)
}.start()
is TimelineEvents.OnFocusEventRender -> {
// If there was a pending 'notification tap opens timeline' transaction, finish it now we're focused in the required event
analyticsService.finishLongRunningTransaction(NotificationTapOpensTimeline)
focusRequestState.value = focusRequestState.value.onFocusEventRender()
}
is TimelineEvents.ClearFocusRequestState -> {
@ -242,7 +245,6 @@ class TimelinePresenter(
analyticsService.run {
finishLongRunningTransaction(DisplayFirstTimelineItems)
finishLongRunningTransaction(OpenRoom)
finishLongRunningTransaction(NotificationTapOpensTimeline)
}
}
.launchIn(this)