Make neccesary changes

This commit is contained in:
Sujal-Gupta-SG 2025-02-17 18:14:20 +05:30
parent aa3eeb32be
commit b2cd964b39
3 changed files with 3 additions and 5 deletions

View file

@ -1,7 +1,6 @@
package fr.free.nrw.commons.nearby.model package fr.free.nrw.commons.nearby.model
import com.google.gson.annotations.SerializedName import com.google.gson.annotations.SerializedName
import java.util.Locale
class ResultTuple { class ResultTuple {
@SerializedName("xml:lang") @SerializedName("xml:lang")
@ -16,7 +15,7 @@ class ResultTuple {
} }
constructor() { constructor() {
language = Locale.getDefault().language language = "bug" // Basa Ugi language - TODO Respect the `Default description language`setting.
type = "" type = ""
value = "" value = ""
} }

View file

@ -373,7 +373,7 @@ class UploadWorker(
return@onErrorReturn null return@onErrorReturn null
}.blockingSingle() }.blockingSingle()
if (uploadResult != null && uploadResult.isSuccessful()) { if (null != uploadResult && uploadResult.isSuccessful()) {
Timber.d( Timber.d(
"Stash Upload success..proceeding to make wikidata edit", "Stash Upload success..proceeding to make wikidata edit",
) )
@ -479,7 +479,7 @@ class UploadWorker(
uploadResult.filename, uploadResult.filename,
contribution.media.captions, contribution.media.captions,
) )
if (revisionID != null) { if (null != revisionID) {
withContext(Dispatchers.IO) { withContext(Dispatchers.IO) {
val place = placesRepository.fetchPlace(wikiDataPlace.id) val place = placesRepository.fetchPlace(wikiDataPlace.id)
place.name = wikiDataPlace.name place.name = wikiDataPlace.name

View file

@ -235,7 +235,6 @@ class WikidataEditService @Inject constructor(
} }
} }
@SuppressLint("NewApi")
private fun captionEdits(contribution: Contribution, fileEntityId: Long): Observable<Boolean> { private fun captionEdits(contribution: Contribution, fileEntityId: Long): Observable<Boolean> {
return Observable.fromIterable(contribution.media.captions.entries) return Observable.fromIterable(contribution.media.captions.entries)
.concatMap { addCaption(fileEntityId, it.key, it.value) } .concatMap { addCaption(fileEntityId, it.key, it.value) }