mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 22:03:55 +01:00
* Fixed Migration warnings under Kotlin header * suppresses Lint --------- Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
This commit is contained in:
parent
f1e8e48769
commit
b55c61ddb8
13 changed files with 28 additions and 20 deletions
|
|
@ -2,6 +2,8 @@ package fr.free.nrw.commons.wikidata
|
|||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import androidx.annotation.RequiresApi
|
||||
import com.google.gson.Gson
|
||||
import fr.free.nrw.commons.R
|
||||
import fr.free.nrw.commons.contributions.Contribution
|
||||
|
|
@ -111,12 +113,14 @@ class WikidataEditService @Inject constructor(
|
|||
.blockingFirst()
|
||||
}
|
||||
|
||||
@SuppressLint("StringFormatInvalid")
|
||||
private fun showSuccessToast(wikiItemName: String) {
|
||||
val successStringTemplate = context.getString(R.string.successful_wikidata_edit)
|
||||
val successMessage = String.format(Locale.getDefault(), successStringTemplate, wikiItemName)
|
||||
showLongToast(context, successMessage)
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
@SuppressLint("CheckResult")
|
||||
private fun addCaption(
|
||||
fileEntityId: Long, languageCode: String,
|
||||
|
|
@ -176,7 +180,7 @@ class WikidataEditService @Inject constructor(
|
|||
SnakPartial(
|
||||
"value",
|
||||
MEDIA_LEGENDS.propertyName, MonoLingualText(
|
||||
WikiBaseMonolingualTextValue(value!!, key!!)
|
||||
WikiBaseMonolingualTextValue(value, key)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue