mirror of
https://github.com/linagora/tmail-flutter.git
synced 2026-12-05 16:08:46 +00:00
The web handler routed its two keep-the-session paths through the mobile one, which had since grown a leading force-logout branch. That branch could not fire on web — it re-tests the same classifier call the web handler had already evaluated to false — but the safety rested on a call-ordering invariant inside the web handler rather than on anything structural. Adding an earlier delegation would have quietly made it live and started logging web users out on failures already ruled transient. Extract the tail both handlers shared into _propagateKeepingSession and have web call it directly, so the logout branch leaves web's call graph entirely. Cover the behaviour too: an OAuthAuthorizationError — the mobile error shape — arriving on web must keep the session. Verified by mutation: re-coupling both delegation sites and pointing the guard at the mobile classifier fails exactly these two tests. Pure move, no behaviour change. Also splits a doc comment that had been merged into the paragraph above it.