8000 Fix stale audio ayah highlights after presenter unbind (#1375) by mohamedelghazali · Pull Request #4045 · quran/quran_android · GitHub
[go: up one dir, main page]

Skip to content

Fix stale audio ayah highlights after presenter unbind (#1375) - #4045

Open
mohamedelghazali wants to merge 2 commits into
quran:mainfrom
mohamedelghazali:fix/ayah-highlight-unbind-1375
Open

mohamedelghazali wants to merge 2 commits into
quran:mainfrom
mohamedelghazali:fix/ayah-highlight-unbind-1375

Conversation

@mohamedelghazali
Copy link
Copy Markdown

Fixes #1375

Root Cause

AyahTrackerPresenter.unbind() canceled scope and cleared items without calling unHighlightAyahs(HighlightTypes.AUDIO) or resetting lastHighlightedAudioAyah = null, leaving stale audio highlights on paused/offscreen fragments (especially TranslationFragment across page boundaries while locked).

Solution

  • Clear HighlightTypes.AUDIO and reset lastHighlightedAudioAyah = null in AyahTrackerPresenter.unbind().
  • Add Robolectric unit tests in AyahTrackerPresenterTest.kt.

Verification

  • assembleMadaniDebug, lintMadaniDebug, verifySqlDelightMigration, and testMadaniDebug testReleaseUnitTest -PdisableFirebase passed on fork CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issues around Ayah highlighting updating

1 participant

0