-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove suspended code from DeckAdapter
The suspended code was removed and a similar implementation was done in DeckPicker which will now do the necessary work and then will pass the calculated data to the adapter. The adapter was changed to extend ListAdapter which uses diff-ing to observe changes so we get free animations. The filtering was removed from the adapter, DeckPicker computes the data as it has all info needed, the query and the deck tree. The adapter becomes dumb and just reacts to the changes. A bit wasteful to start a coroutine for each change in the query text, but I wanted to keep the change count small. Note: the methods findDeckPosition() and getNodeByDid() were moved in DeckPicker, they are not needed by the adapter and the DeckPicker already has a reference to the deck tree that it can use in the methods.
- Loading branch information
Showing
3 changed files
with
110 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters