mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 06:43:56 +01:00 
			
		
		
		
	Merge branch 'main' into main
This commit is contained in:
		
						commit
						3fe5960af9
					
				
					 2 changed files with 5 additions and 11 deletions
				
			
		|  | @ -41,7 +41,6 @@ import fr.free.nrw.commons.R | ||||||
| import fr.free.nrw.commons.customselector.database.NotForUploadStatus | import fr.free.nrw.commons.customselector.database.NotForUploadStatus | ||||||
| import fr.free.nrw.commons.customselector.database.NotForUploadStatusDao | import fr.free.nrw.commons.customselector.database.NotForUploadStatusDao | ||||||
| import fr.free.nrw.commons.customselector.helper.CustomSelectorConstants | import fr.free.nrw.commons.customselector.helper.CustomSelectorConstants | ||||||
| import fr.free.nrw.commons.customselector.helper.CustomSelectorConstants.SHOULD_REFRESH |  | ||||||
| import fr.free.nrw.commons.customselector.listeners.FolderClickListener | import fr.free.nrw.commons.customselector.listeners.FolderClickListener | ||||||
| import fr.free.nrw.commons.customselector.listeners.ImageSelectListener | import fr.free.nrw.commons.customselector.listeners.ImageSelectListener | ||||||
| import fr.free.nrw.commons.customselector.model.Image | import fr.free.nrw.commons.customselector.model.Image | ||||||
|  | @ -237,8 +236,7 @@ class CustomSelectorActivity : | ||||||
|             val selectedImages: ArrayList<Image> = |             val selectedImages: ArrayList<Image> = | ||||||
|                 data!! |                 data!! | ||||||
|                     .getParcelableArrayListExtra(CustomSelectorConstants.NEW_SELECTED_IMAGES)!! |                     .getParcelableArrayListExtra(CustomSelectorConstants.NEW_SELECTED_IMAGES)!! | ||||||
|             val shouldRefresh = data.getBooleanExtra(SHOULD_REFRESH, false) |             viewModel?.selectedImages?.value = selectedImages | ||||||
|             imageFragment?.passSelectedImages(selectedImages, shouldRefresh) |  | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -279,6 +279,10 @@ class ImageFragment : | ||||||
|                 filteredImages = ImageHelper.filterImages(images, bucketId) |                 filteredImages = ImageHelper.filterImages(images, bucketId) | ||||||
|                 allImages = ArrayList(filteredImages) |                 allImages = ArrayList(filteredImages) | ||||||
|                 imageAdapter.init(filteredImages, allImages, TreeMap(), uploadingContributions) |                 imageAdapter.init(filteredImages, allImages, TreeMap(), uploadingContributions) | ||||||
|  |                 viewModel?.selectedImages?.value?.let { selectedImages -> | ||||||
|  |                     imageAdapter.setSelectedImages(selectedImages) | ||||||
|  |                 } | ||||||
|  |                 imageAdapter.notifyDataSetChanged() | ||||||
|                 selectorRV?.let { |                 selectorRV?.let { | ||||||
|                     it.visibility = View.VISIBLE |                     it.visibility = View.VISIBLE | ||||||
|                     lastItemId?.let { pos -> |                     lastItemId?.let { pos -> | ||||||
|  | @ -382,14 +386,6 @@ class ImageFragment : | ||||||
|         selectedImages: ArrayList<Image>, |         selectedImages: ArrayList<Image>, | ||||||
|         shouldRefresh: Boolean, |         shouldRefresh: Boolean, | ||||||
|     ) { |     ) { | ||||||
|         imageAdapter.setSelectedImages(selectedImages) |  | ||||||
| 
 |  | ||||||
|         val uploadingContributions = getUploadingContributions() |  | ||||||
| 
 |  | ||||||
|         if (!showAlreadyActionedImages && shouldRefresh) { |  | ||||||
|             imageAdapter.init(filteredImages, allImages, TreeMap(), uploadingContributions) |  | ||||||
|             imageAdapter.setSelectedImages(selectedImages) |  | ||||||
|         } |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 whe128
						whe128