Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6154667 authored by Wenbo Jie's avatar Wenbo Jie
Browse files

[DocsUI] Fix the selection not in sync bug

If some files are already in selected state, and the model update
removes these files from the result (e.g. files get deleted),
previously the files were just removed from the selection list
iterator directly, which wouldn't notify its observers, result in the
selection model and selection title ("X selected") not in sync.

This CL uses the selection manager's setItemsSelected(false) to
removes these files from the selection, which will also notify its
observers so the selection title can update.

Bug: 417863874
Test: atest DocumentsUIGoogleTests:com.android.documentsui.dirlist.DirectoryFragmentTest
Flag: EXEMPT bug fix
Change-Id: I208130673bdea796ee90980312cacd78ec98c860
parent c8cd5dd9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment