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:
Ayan Sarkar 2022-03-22 11:03:43 +05:30 committed by GitHub
parent e58322ed63
commit bd9531b969
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 1261 additions and 75 deletions

View file

@ -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)
}
}
}