mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 14:53:59 +01:00 
			
		
		
		
	Set name of the place to avoid race condition with NearbyParentFragment. Update Success Notification to show only after the pin has been updated.
This commit is contained in:
		
							parent
							
								
									1038cb2d19
								
							
						
					
					
						commit
						8783138e9e
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -477,9 +477,9 @@ class UploadWorker( | ||||||
|                             contribution.media.captions, |                             contribution.media.captions, | ||||||
|                         ) |                         ) | ||||||
|                     if (null != revisionID) { |                     if (null != revisionID) { | ||||||
|                         showSuccessNotification(contribution) |  | ||||||
|                         withContext(Dispatchers.IO) { |                         withContext(Dispatchers.IO) { | ||||||
|                             val place = placesRepository.fetchPlace(wikiDataPlace.id); |                             val place = placesRepository.fetchPlace(wikiDataPlace.id); | ||||||
|  |                             place.name = wikiDataPlace.name; | ||||||
|                             place.pic = HOME_URL + uploadResult.createCanonicalFileName() |                             place.pic = HOME_URL + uploadResult.createCanonicalFileName() | ||||||
|                             placesRepository |                             placesRepository | ||||||
|                                 .save(place) |                                 .save(place) | ||||||
|  | @ -487,6 +487,7 @@ class UploadWorker( | ||||||
|                                 .blockingAwait() |                                 .blockingAwait() | ||||||
|                             Timber.d("Updated WikiItem place ${place.name} with image ${place.pic}") |                             Timber.d("Updated WikiItem place ${place.name} with image ${place.pic}") | ||||||
|                         } |                         } | ||||||
|  |                         showSuccessNotification(contribution) | ||||||
|                     } |                     } | ||||||
|                 } catch (exception: Exception) { |                 } catch (exception: Exception) { | ||||||
|                     Timber.e(exception) |                     Timber.e(exception) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Christo Joby Antony
						Christo Joby Antony