fix(ui): use selected account for manage folders
Description
Fixes #11128.
When MessageHomeActivity initializes from a single-account search, it now resolves and stores the account from that search even if another account was already selected in the activity. This keeps Manage Folders aligned with the account chosen from the drawer instead of reusing a stale account.
The account-selection logic is extracted into a small helper and covered with a focused unit test.
Screenshots
Not applicable; this changes account selection logic for navigation and does not alter UI layout.
Checklist
- [x] The change is covered by a focused unit test.
- [x] I ran the relevant local verification.
- [x] This contribution includes changes created by AI.
Verification
git diff --checkJAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home" ./gradlew --no-daemon --console=plain :legacy:ui:legacy:testDebugUnitTest --tests com.fsck.k9.activity.MessageHomeAccountSelectorTest
✅ Validation Passed: All report and feature-flag labels are correctly set.
Thanks for your contribution! Your pull request has been merged and will be part of Thunderbird 22. We appreciate the time and effort you put into improving Thunderbird. If you haven’t already, you’re welcome to join our Matrix chat for contributors. It’s where we discuss development and help each other out. https://matrix.to/#/#tb-android-dev:mozilla.org Hope to see you there! 🚀📱🐦