Convert mwapi/wikidata to kotlin (part 1) (#5991)

* Convert OkHttpJsonApiClient and CategoryApi to kotlin

* Convert GsonUtil to kotlin

* Convert WikidataConstants to kotlin

* Convert WikidataEditListener to kotlin

* Convert WikidataEditService to kotlin

* work in progress

* Convert RequiredFieldsCheckOnReadTypeAdapterFactory to kotlin

* Converted type adapters

* Convert WikiSiteTypeAdapter to kotlin

* Fixed nullability
This commit is contained in:
Paul Hawke 2024-12-05 08:13:38 -06:00 committed by GitHub
parent 9dd504e560
commit 3777f18bf9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 1490 additions and 1746 deletions

View file

@ -52,12 +52,12 @@ class CampaignsPresenter @Inject constructor(
return
}
okHttpJsonApiClient.campaigns
okHttpJsonApiClient.getCampaigns()
.observeOn(mainThreadScheduler)
.subscribeOn(ioScheduler)
.doOnSubscribe { disposable = it }
.subscribe({ campaignResponseDTO ->
val campaigns = campaignResponseDTO.campaigns?.toMutableList()
val campaigns = campaignResponseDTO?.campaigns?.toMutableList()
if (campaigns.isNullOrEmpty()) {
Timber.e("The campaigns list is empty")
view!!.showCampaigns(null)