Feature/refactor contributions (#3046)

* * Refactored ContributionsListFragment to use RecyclerView
* Added ContributionsPresenter
* Extracted out the cursor to presenter
* Probable fix for #3028

* Improved the logic for cache in ContributionViewHolder

* Some more refactoring

* While displaying images in ContributionsList, check if status is not completed && local uri exists, use that uri to show image

* typo correction in LocalDataSource

* Fixed formatting in ContributionsPresenter

* retain adapter position when orientation changes

* retain child position with its id

* Made ContributionViewHolder not implement ViewHolder

* Code formatting, review suggested changes

* initialise the rv layout managers only when needed

* added test cases for ContributionPresenter

* removed not needed semi colon

* added more java docs and code formatting
This commit is contained in:
Ashish Kumar 2019-07-07 12:54:28 +05:30 committed by neslihanturan
parent 108e28c89a
commit 60b1eb1957
22 changed files with 814 additions and 592 deletions

View file

@ -1,5 +1,6 @@
package fr.free.nrw.commons.di;
import fr.free.nrw.commons.contributions.ContributionsModule;
import javax.inject.Singleton;
import dagger.Component;
@ -28,7 +29,7 @@ import fr.free.nrw.commons.widget.PicOfDayAppWidget;
ActivityBuilderModule.class,
FragmentBuilderModule.class,
ServiceBuilderModule.class,
ContentProviderBuilderModule.class, UploadModule.class
ContentProviderBuilderModule.class, UploadModule.class, ContributionsModule.class
})
public interface CommonsApplicationComponent extends AndroidInjector<ApplicationlessInjection> {
void inject(CommonsApplication application);