mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Fix method invocations
This commit is contained in:
parent
d5b62befc9
commit
2854f6af02
1 changed files with 11 additions and 8 deletions
|
|
@ -286,23 +286,26 @@ public class UploadService extends HandlerService<Contribution> {
|
|||
showFailedNotification(contribution);
|
||||
} else {
|
||||
String canonicalFilename = "File:" + uploadResult.getFilename();
|
||||
final String wikiDataEntityId = contribution.getWikiDataEntityId();
|
||||
Timber.d("Contribution upload success. Initiating Wikidata edit for entity id %s",
|
||||
contribution.getWikiDataEntityId());
|
||||
wikiDataEntityId);
|
||||
// to perform upload of depictions we pass on depiction entityId of the selected depictions to the wikidataEditService
|
||||
final String p18Value = contribution.getP18Value();
|
||||
final String wikiItemName = contribution.getWikiItemName();
|
||||
if (contribution.getDepictionsEntityIds() != null) {
|
||||
for (String s : contribution.getDepictionsEntityIds()) {
|
||||
wikidataEditService.createClaimWithLogging(s, canonicalFilename,
|
||||
p18Value);
|
||||
for (String depictionEntityId : contribution.getDepictionsEntityIds()) {
|
||||
wikidataEditService.createClaimWithLogging(depictionEntityId,
|
||||
wikiItemName, canonicalFilename, p18Value);
|
||||
}
|
||||
}
|
||||
Timber.d("Contribution upload success. Initiating Wikidata edit for"
|
||||
+ " entity id %s if necessary (if P18 is null). P18 value is %s",
|
||||
contribution.getWikiDataEntityId(), contribution.getP18Value());
|
||||
wikidataEditService.createClaimWithLogging(contribution.getWikiDataEntityId(), contribution.getWikiItemName(), canonicalFilename, contribution.getP18Value());
|
||||
wikiDataEntityId, p18Value);
|
||||
wikidataEditService.createClaimWithLogging(
|
||||
wikiDataEntityId, wikiItemName, canonicalFilename,p18Value);
|
||||
|
||||
wikidataEditService.createLabelforWikidataEntity(contribution.getWikiDataEntityId(), canonicalFilename,
|
||||
(Map) contribution.getCaptions());
|
||||
wikidataEditService.createLabelforWikidataEntity(
|
||||
wikiDataEntityId, canonicalFilename, contribution.getCaptions());
|
||||
contribution.setFilename(canonicalFilename);
|
||||
contribution.setImageUrl(uploadResult.getImageinfo().getOriginalUrl());
|
||||
contribution.setState(Contribution.STATE_COMPLETED);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue