mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Skip image upload to Wikidata if item already has image
This commit is contained in:
parent
9eff9e8e82
commit
c1aead8b24
2 changed files with 6 additions and 10 deletions
|
|
@ -473,6 +473,8 @@ class UploadWorker(
|
|||
if (!contribution.hasInvalidLocation()) {
|
||||
var revisionID: Long? = null
|
||||
try {
|
||||
// Only set P18 if the place does not already have a picture
|
||||
if (wikiDataPlace.imageValue.isNullOrBlank()) {
|
||||
revisionID =
|
||||
wikidataEditService.createClaim(
|
||||
wikiDataPlace,
|
||||
|
|
@ -492,6 +494,10 @@ class UploadWorker(
|
|||
}
|
||||
showSuccessNotification(contribution)
|
||||
}
|
||||
} else {
|
||||
// Place already has a picture, so skip setting P18 but still show success notification
|
||||
showSuccessNotification(contribution)
|
||||
}
|
||||
} catch (exception: Exception) {
|
||||
Timber.e(exception)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Authors:
|
||||
* Vlad5250
|
||||
-->
|
||||
<resources>
|
||||
<string name="crash_dialog_title">کامَنٕز گوو رُکِتھ</string>
|
||||
<string name="crash_dialog_text">Oops. کیہہ تام گوو غلط!</string>
|
||||
<string name="crash_dialog_comment_prompt">ؤنِیوٚ اَسہِ توٚہہِ کیاہ ٲسِیوٚ کران، تہٕ کٕریٚو تہِ اَسہِ سٕتی شیر بذریعہِ برقی خط. یُس مَدَتھ کَرِ اَسہِ اَتھ شہَرنَس منٛز!</string>
|
||||
<string name="crash_dialog_ok_toast">شُکریہ!</string>
|
||||
</resources>
|
||||
Loading…
Add table
Add a link
Reference in a new issue