Files
tmail-flutter/lib
Dang Dat 562a484727 TF-4728 Split the drive pick outcome branching out of the entry point
Problem: CodeScene flags handleDrivePickResult twice — cyclomatic
complexity 9 (threshold 9) and a complex conditional with 2 branches
(threshold 2). Both come from the same cause: the entry point decides
which toast to show as well as what to attach.

Decision: keep the entry point to the pick flow (split, insert, transfer)
and move each toast decision to its own named method. The dropped-docs
conditional is split as `droppedCount == 0 || !attachedAny` inside
_showDroppedDocsFailure, with the two-list check passed in as one
argument, so no single expression chains two operators. Behaviour is
unchanged — all 29 handler tests pass untouched.

Addresses: 3860581376, 3860587468
https://github.com/linagora/tmail-flutter/pull/4767#discussion_r3860581376
https://github.com/linagora/tmail-flutter/pull/4767#discussion_r3860587468
2026-08-26 17:26:59 +07:00
..