2.4 KiB
2.4 KiB
Telegram Android ChatMessageCell — bubble grouping, tails, in-bubble metadata
Metadata
| Field | Value |
|---|---|
| Institute | Molodetz Institute — Research & Retrieval Division |
| Subject | tui-framework-design |
| Document type | Source Dossier |
| Tier | 1 |
| Source title | ChatMessageCell.java (Telegram Android message cell) |
| Source URL | https://raw.githubusercontent.com/DrKLO/Telegram/master/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java |
| Source publisher / author | Telegram (DrKLO/Telegram, official Android client) |
| Source type | repository |
| Source date (published) | Unknown — not stated |
| Date researched | 2026-10-11 |
| Researched by | tai (agent), model: Muse Spark, on behalf of retoor |
| Research method | direct page fetch |
| Confidence | High |
| Status | Active |
Summary
The actual Android implementation of message grouping and in-bubble metadata: consecutive same-sender messages join via position flags with squared inner corners, the tail appears only on the last message of a group, and the timestamp sits at the bubble's bottom-right with the sender's checks immediately after.
Key findings
- Joined message groups use
POSITION_FLAGtop/bottom/left/right combinations; inner (joined) corners are squared. - The bubble tail renders only on the last message of a consecutive same-sender group.
- Timestamp is bottom-right inside the bubble (
timeX = backgroundWidth - dp(4) - timeWidth); on own messages the checks render immediately after the time. - Group sender names are header-colored from the 8-hue peer palette.
- Incoming bubbles sit left, outgoing right; the in/out key split holds across clients.
Pros / strengths
- Ground-truth grouping and tail logic straight from the shipped renderer.
- Exact time-placement formula leaves no ambiguity about metadata position.
Cons / limitations / caveats
- Android only; tail side, corner radii, paddings, and inter-message spacing per client were not captured (open gap).
- Media-bubble time-overlay details were not captured (open gap).
- The class is large; only the grouping/tail/metadata subset was synthesized.
Relevance to tai
Defines the grouping grammar tai keeps even without bubbles (join consecutive same-sender rows, metadata at the row's trailing end, peer-hue sender names) and the bubble geometry tai deliberately does not need.
Changelog
| Date | Change |
|---|---|
| 2026-10-11 | Initial dossier created. |