refactor(search): resolve install button's action on error and app uninstallation events
Description
refactor(search): resolve install button's label and action on onResume() callback
To reflect the correct state and label on the install button, fragment updates the PagingData flow on its onResume() callback. So, when an app is uninstalled from system, the search results don't show it as installed any more, instead, the button's label and state are updated.
refactor(search): resolve install button's action when it's stuck on indefinite progress indicator
For error scenarios where install button's action was set to NoOp, there was no handling for it. Hence, clicking on the button wouldn't perform any action.
This commit fixes the issue by canceling any pending operation when such scenario occurs.
Screenshots
| Recover install button's state and label | Button's state and label updates on app uninstall |
|---|---|
Technical details
Tests
Issues
https://gitlab.e.foundation/e/os/backlog/-/issues/4127
10 commandments of code review
Edited by Fahim M. Choudhury