"Collapse all" button act like "Expand all" when folders are unfolded manually

Same problem (on Android, too).