mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
Prevent deletion of other structured data when editing depicts (#5741)
* restructure : minor changes to comments to improve readability * api: remove clear flag to prevent deletion of structured data * WikiBaseInterface: add new api methods Get Method: to get claims for an entity Post method: to delete claims * WikiBaseClient: add methods to handle response for new APIs * typo: update call to method with updated typo * DepictEditHelper: call update property method with entity id * refactor: dismiss progress dialog on error * DepictsDao: remove usage of runBlocking as it was blocking main thread Refactor methods to perform well with coroutines * refactor: update usage of method to match changes in DepictsDao * refactor: use named parameters to improve readability * claims: add new data classes to represent remove claims * WikidataEditService: modify update depicts property method Performs deletion of old claims and creation of new claims * refactor: make methods more organized
This commit is contained in:
parent
31bb1a73c0
commit
46df64d208
12 changed files with 188 additions and 124 deletions
|
|
@ -77,7 +77,7 @@ class WikiBaseClientUnitTest {
|
|||
"M123", "test", "en", "caption"
|
||||
)).thenReturn(Observable.just(mwPostResponse))
|
||||
|
||||
val result = wikiBaseClient.addLabelstoWikidata(123L, "en", "caption").blockingFirst()
|
||||
val result = wikiBaseClient.addLabelsToWikidata(123L, "en", "caption").blockingFirst()
|
||||
|
||||
assertSame(mwPostResponse, result)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue