Repository navigation
fix(android): discard audio prepared after leaving chat - #433
Open
plotarmordev wants to merge 1 commit into
Open
plotarmordev wants to merge 1 commit into
plotarmordev wants to merge 1 commit into
Conversation
[Low impact] The PR appears safe to merge; no actionable issues were found. SummaryType: bug fix | Areas: Android, web, docs | Priority: P2: medium Android now releases audio that finishes preparing after its chat card is removed.
plotarmordev explicitly deferred the version bump and release-note files to release. They also reported skipping emulator validation because the preparation timing is controlled in the unit test. Tests were not rerun during this review. Reviews (1) · Last reviewed commit: "fix(android): discard audio prepared aft..." · Reviewed by Greptile |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A small follow-up to #364 (voice notes and audio in chat), Android only. It replaces #432: same commit, opened from this branch instead.
On Android, if you left a chat while a voice note was still loading, the player could finish preparing after its card was gone and start playing with nothing on screen to stop it.
SharedAudionow checks whether the card was released when the player comes back from preparing; if so, it releases that player right away and never starts it.SharedAudio.kt: release a player that finishes preparing after the card was released, instead of keeping and starting it.SharedAudioTest.kt: a regression test that releases a card while its sound prepares, then checks that the player is released, never plays, and that a second release does nothing.docs/features/file-attachments.mdand the user manual'sweb/content/docs/conversations.mdx.iPhone and desktop are unaffected: they already drop a note that loads after its card is gone, and #364's iPhone tests cover a card closed mid-load. The terminal UI doesn't play audio.
I left the version bump and the
WhatsNew.mdsections for you to add when you release; my release notes are below.Validation
:app:testDebugUnitTestpasses withSharedAudioTestat 10/10, including the new test.What's New: iPhone
zh-Hant
en-US
What's New: Android
zh-Hant
en-US