mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Fixed 4616 : Option for editing depictions (#4725)
* Dialog can't be dismissed * Dialog can't be dismissed * Option for editing depiction * Java docs added * Minor issues fixed * Lining done * "Depictions not updating instantly" issue resolved * Existing Depicts on the top * Existing Depicts on the top * Back press handled * Previous depictions unchecked * Whole Screen issue fixed * Nearby banner removed * Test fixed * Upload Wizard issue fixed * Upload Wizard issue fixed * Previous depicts issue fixed * Previous depicts issue fixed * All issues fixed * Fixed late loading of updated depicts * Depiction is removable * Test fixed * Back button press handled after losing focus for edittext * RequiresApi removed * RequiresApi removed * Test fixed * Requested changes * Test added * Test added * UploadModelUnitTest added * DepictEditHelperUnitTest added * DepictEditHelperUnitTest added * Test added * More test added * Indentation Reversed * Indentation reversed * Update MediaDetailFragment.java * Indentation reversed * Update MediaDetailFragment.java * Indentation reversed * Indentation reversed * Indentation reversed * Indentation reversed * More test added * More test added * Minor fixes * Minor fixes * Minor fixes
This commit is contained in:
parent
e58322ed63
commit
bd9531b969
24 changed files with 1261 additions and 75 deletions
|
|
@ -7,9 +7,11 @@ data class EditClaim(val claims: List<Statement_partial>) {
|
|||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun from(entityId: String, propertyName: String) =
|
||||
EditClaim(
|
||||
listOf(
|
||||
fun from(entityIds: List<String>, propertyName: String): EditClaim {
|
||||
|
||||
val list = mutableListOf<Statement_partial>()
|
||||
entityIds.forEach {
|
||||
list.add(
|
||||
Statement_partial(
|
||||
Snak_partial(
|
||||
"value",
|
||||
|
|
@ -17,8 +19,8 @@ data class EditClaim(val claims: List<Statement_partial>) {
|
|||
EntityId(
|
||||
WikiBaseEntityValue(
|
||||
"item",
|
||||
entityId,
|
||||
entityId.removePrefix("Q").toLong()
|
||||
it,
|
||||
it.removePrefix("Q").toLong()
|
||||
)
|
||||
)
|
||||
),
|
||||
|
|
@ -26,6 +28,8 @@ data class EditClaim(val claims: List<Statement_partial>) {
|
|||
"preferred"
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
return EditClaim(list)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue