mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-30 22:34:02 +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,
|
||||
)
|
||||
if (null != revisionID) {
|
||||
showSuccessNotification(contribution)
|
||||
withContext(Dispatchers.IO) {
|
||||
val place = placesRepository.fetchPlace(wikiDataPlace.id);
|
||||
place.name = wikiDataPlace.name;
|
||||
place.pic = HOME_URL + uploadResult.createCanonicalFileName()
|
||||
placesRepository
|
||||
.save(place)
|
||||
|
|
@ -487,6 +487,7 @@ class UploadWorker(
|
|||
.blockingAwait()
|
||||
Timber.d("Updated WikiItem place ${place.name} with image ${place.pic}")
|
||||
}
|
||||
showSuccessNotification(contribution)
|
||||
}
|
||||
} catch (exception: Exception) {
|
||||
Timber.e(exception)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue