Merge pull request #4413 from element-hq/feature/bma/fixOpenMedia

Ensure that a click on a media open the correct media.
This commit is contained in:
Benoit Marty 2025-03-17 10:06:56 +01:00 committed by GitHub
commit a6b8e5ca10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -78,10 +78,7 @@ class MediaViewerNode @AssistedInject constructor(
}
when (timelineMode) {
null -> timelineMediaGalleryDataSource
Timeline.Mode.LIVE -> {
// Even if the timelineMediaGalleryDataSource does not know the eventId, the SDK will create the timeline faster
timelineMediaGalleryDataSource
}
Timeline.Mode.LIVE,
Timeline.Mode.FOCUSED_ON_EVENT -> {
// Does timelineMediaGalleryDataSource knows the eventId?
val lastData = timelineMediaGalleryDataSource.getLastData().dataOrNull()