Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert gallery from mvp to mvvm (#443)
* Add inject method * Create fragment * Add view model * Extract flows * Move logic down to viewmodel * Update proper data structure * Observe data change * Collect state ad update method call * Create new view adapters version * Extract states, collect them in view * Add argument names * Provide view models * Navigate to new uplift gallery screen * Provide layout file * Set value when navigate * Handle state change * Handle state change * Improve coding style * Extract classes & refactor code usage * Update method modifiers * Update method modifiers * Reorder properties * Use backing field * Create state and side effect * Extract state to side effect * Remove unused state, update state param * Temporarily replace flow by side effect * Trigger side effect * Extract side effect * Extract side effect * Fix klihnt check * Fix klihnt check * Fix klihnt check * Fix klihnt check * Fix klihnt check * Improve default value * Init state, simplify code flow * Rename method * Reformat code * Fix wrong order of method call, simplify post effect call by reducing intent block * Remove space * Fix score widget not shown * Remove unused class * Extract state of progress * Use new progress state * Use new progress state * Extract strings * Fix klint code format * Fix klint code format * Fix klint code format * Move controlsVisible to state * Move rootAndFav to state * call initStorages from viewmodel init * Handle startPos in viewModel * update pager items in render, move gallery items to state * Add path to GalleryItem, replace GalleryPresenter.GalleryItem * dont bind viewholders in viewmodel * disable StrictMode * refactor onRemoveFabClick * make GalleryState.currentItem as property * Use currentItem from state not from viewmodel property * remove updateAdapter sideEffect and diffResult from viewmodel * use state gallery items instead of viewmodel property * Refactor side effects and domain models * Refactor selecting and move selectedResources to state * Move progress state to screen state * Move tags to state * Handle setupPreview in render * Optimize render * Move rootAndFav to state * Move resourcesIds to state * minor * ktlint formatting * Remove old gallery screen --------- Co-authored-by: mdrlzy <[email protected]>
- Loading branch information