element-hq / element-hq/element-x-android

Timeline gap in room after using media gallery in it first, then scrolling up

Open
#4,082 4 comments 1 reaction 0 assignees View on GitHub
A-Timeline O-Occasional S-Major T-Defect X-Needs-Rust
Dominant language
Kotlin
Stars
2.4k
Forks
624
Avg merge
1d 14h
Merged PRs (30d)
149

Description

### Steps to reproduce

1. Launch app (no room timeline in memory etc.)
2. Go to a room
3. Don't scroll up, go to gallery
4. Once some images appear, go back to room
5. Scroll up in room

### Outcome

#### What did you expect?
All messages to be always visible in timeline, no matter if media gallery is used before scrolling up in the room, or not.

#### What happened instead?
There's a gap in timeline, from `ElementX always opens room [...]` ([link](https://matrix.to/#/!aCvOWKNDeXXpPgquKq:matrix.org/$hksJeyN9NuDL9AW17kthvwse9QyZbdYEc6BGlnkQhNo?via=matrix.org&via=envs.net&via=tchncs.de)) to `I am slowly frustrated [...]` ([link](https://matrix.to/#/!aCvOWKNDeXXpPgquKq:matrix.org/$pbtiJqYiB8CQ80eV6fBvSh2JRrfqQFEn9avVlOcb_k0?via=matrix.org&via=envs.net&via=tchncs.de)), missing a day's worth of messages. This _might_ be the same spot in timeline to which the media gallery was able to load images from the room.

https://github.com/user-attachments/assets/9d712a04-9c00-4657-9997-f94df4fbed0f

Here's the same spot in the room after force stopping app and relaunching, then going into the same room and just scrolling up. `ElementX always opens room [...]` ([link](https://matrix.to/#/!aCvOWKNDeXXpPgquKq:matrix.org/$hksJeyN9NuDL9AW17kthvwse9QyZbdYEc6BGlnkQhNo?via=matrix.org&via=envs.net&via=tchncs.de)) is visible, and the message preceding it is `Thanks!` ([link](https://matrix.to/#/!aCvOWKNDeXXpPgquKq:matrix.org/$xGeM6EDH-7ZhNrT1T9WBMR4Di0Q3UVYDUAl7iuK_zGU?via=matrix.org&via=envs.net&via=tchncs.de)), as expected.

![Screenshot_20241220-155518](https://github.com/user-attachments/assets/94eb265b-6940-4882-a018-67053437aa55)

### Your phone model

Google Pixel 7 Pro

### Operating system version

Android 15

### Application version and app store

Element X v0.7.6 from GH releases

### Homeserver

Synapse v1.121.1

### Will you send logs?

Yes

### Are you willing to provide a PR?

No

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.