Skip to content

Commit ee9baf6

Browse files
ashishkumar468neslihanturan
authored andcommitted
bugfix/uploads (#3012)
* merged with master * BugFix IllegalStateException * setRetainState(true), not required with FragmentStatePagerAdapter * Increase the ViewPager's Offscreen Limit, we want all the fragments to be active * BugFix, clear selected categoris for previous upload session * Clear Selected Categories * Addded JavaDocs for CategoriesModel * Code Formatting in app/src/main/java/fr/free/nrw/commons/upload/UploadModel.java * Added class level JavaDoc UploadRemoteDataSource * Added class level JavaDoc for UploadRepository * Added JavaDocs for ThumbnailsAdapter * Added JavaDocs for MediaLicensePresenter, CategoriesPresenter * Removed null check on category query * Show default catgeories based on image title and gps location when category text empty * Allow search for empty category search * Attached image scale listener to upload media image * Bug fix, reduced the add description edit text clickable bound * Added tooltip in Title in UploadMediaFragment * BugFix recent categories * Updated test methods * Avoid memory leak, free the adpater in MediaLicenseFragment.onDestroyView * BugFix Illegal State Exception in ViewpPagerAdapter * Remove irrelevant comment
1 parent 0782e72 commit ee9baf6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/src/main/java/fr/free/nrw/commons/upload/UploadActivity.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ public int getTotalNumberOfSteps() {
341341
fragments.add(mediaLicenseFragment);
342342

343343
uploadImagesAdapter.setFragments(fragments);
344+
vpUpload.setOffscreenPageLimit(fragments.size());
344345
}
345346
}
346347

@@ -430,8 +431,6 @@ public void setFragments(List<Fragment> fragments) {
430431
}
431432

432433
@Override public int getCount() {
433-
//I understand this is not the best way, I will think of something better than this
434-
vpUpload.setOffscreenPageLimit(fragments.size());
435434
return fragments.size();
436435
}
437436

0 commit comments

Comments
 (0)