Bug 1881294 - Refine `isExpectedTranslate`
commit2a9c4f8c91db1091459eda5842559eed7c1a676f
authorohall-m <ohall@mozilla.com>
Wed, 21 Feb 2024 19:38:40 +0000 (21 14:38 -0500)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 27 Feb 2024 05:11:50 +0000 (27 05:11 +0000)
tree902369247b7f5ffff261c37ea309b8c47c2e2bec
parentfe37d6243777deaf817ac0d254ace32fee6b0398
Bug 1881294 - Refine `isExpectedTranslate`

This patch fixes an issue where `isExpectedTranslate` is not cleared
between navigations. It adds logic in `TranslationsStateReducer` to
check if the criteria is met and clears the state, if applicable.
mobile/android/android-components/components/browser/state/src/main/java/mozilla/components/browser/state/reducer/TranslationsStateReducer.kt
mobile/android/android-components/components/browser/state/src/test/java/mozilla/components/browser/state/action/TranslationsActionTest.kt