UnigramDev/Unigram/playback-reconcile • 7c83a60 • 2 files, +104/-49 Fix threading around the transpo

Telegram github commits and releases

Telegram github commits and releases

@tgappsupdates

Broadcast from the most important Telegram clients' repositories

4,538 subscribers
Open in Telegram
UnigramDev/Unigram/playback-reconcile7c83a602 files, +104/-49
Fix threading around the transport controls and the player

The transport belongs to the view it was acquired for, so every write to
it now goes back to that view's thread; it can otherwise be driven from a
second window's thread once a Clear has recreated the player there.

Player creation takes the same lock the rest of the player access does,
and repeat mode and shuffle are persisted and mirrored to the transport.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

UnigramDev/Unigram/playback-reconcile2b841f93 files, +487/-57
Grow the playback playlist as it is played

The playlist was one search of up to a hundred messages around the one
that started it, and the profile audio one was the first hundred audios
with the played one moved to the front. Both now page in as the current
track nears either end, through a source that owns its cursors.

A caller holding a profile source and the audios it loaded can hand both
over, so the playlist keeps the profile order instead of starting again.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

UnigramDev/Unigram/playback-reconcileffd2c402 files, +19/-4
Start a handed-over profile playlist past the items it came with

Paging profile audio is by position, so a caller that hands over items
without the source that loaded them left the cursor at zero and the first
page repeated them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

UnigramDev/Unigram/playback-reconcilef2b71db3 files, +323/-2
Keep the playlist in step with the chat and the profile

Chat playlists follow UpdateNewMessage, UpdateDeleteMessages and
UpdateMessageSendSucceeded; deleting the playing message skips to the
next one rather than letting it play out.

Profile audio has no such updates and only ever changes from the playback
popup, so the popup reports it, and an audio removed there plays on.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

#unigram
Open post in Telegram