element-hq / element-hq/element-android

Quick scrolling through timeline with m.notice messages causes some of them to suck surrounding regular messages into themselves

Open
#8,443 3 comments 0 reactions 0 assignees View on GitHub
A-Timeline O-Occasional S-Major T-Defect
Dominant language
Kotlin
Stars
3.7k
Forks
917
PR merge metrics
No merged PRs in 30d

Description

### Steps to reproduce

1. Join a room with one or more `m.notice` messages present, such as [#ping:maunium.net](https://matrix.to/#/#ping:maunium.net)
2. Send a regular text message (or have another user send it, as was the case in screenshots below)
3. Scroll quickly through older messages in the room, making use of inertial scrolling
4. After a few attempts one or more `m.notice` messages will pull one of regular messages into its body, rendered as if they were part of the same message bubble
5. Long press the m.notice part of bubble and go to source - you'll see source of m.notice message
6. Long press the regular message's text on the bubble and go to source - you'll see source of the regular message

This issue can be reproduced in other rooms too, but in the ping room it's easier to spot due to large amount of m.notices. It's been a problem on older app versions too, definitely on 1.5.32.

### Outcome

#### What did you expect?
m.notices not sucking nearby regular messages into themselves.
#### What happened instead?
One of m.notices as displayed in timeline after a few seconds of scrolling up and down:
![mpv-shot0001](https://github.com/vector-im/element-android/assets/46846000/2df5ee01-4855-4e77-af21-18fa24eebfbd)

The "Pong! (...)" response was sent by `Ping [nevarro.space]`, "hyper test" was sent by "Hyperbot" in response to my "test" message.

Menu and message source after long press on "hyper test" text:
![mpv-shot0002](https://github.com/vector-im/element-android/assets/46846000/f5461394-cc16-4e2b-80b1-5f1df90c3541)
![mpv-shot0003](https://github.com/vector-im/element-android/assets/46846000/46b6e4aa-13d3-4c45-aaaa-97c17d82b956)

Menu and message source after long press on "Pong! (..)" text:
![mpv-shot0004](https://github.com/vector-im/element-android/assets/46846000/a1248ee1-a80f-4d6d-92a5-ced045074e1c)
![mpv-shot0005](https://github.com/vector-im/element-android/assets/46846000/50e1a179-ff26-4919-9e0d-5415e72769d7)

### Your phone model

Google Pixel 3

### Operating system version

Android 12

### Application version and app store

Element 1.6.0 from .apk in GH releases

### Homeserver

Synapse 1.83.0

### 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.