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:
Rohit Verma 2024-08-26 12:13:50 +05:30 committed by GitHub
parent 31bb1a73c0
commit 46df64d208
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 188 additions and 124 deletions

View file

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