mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 04:13:53 +01:00
Add error handling when API call fails to CategoriesPresenter.onAttachViewWithMedia
This commit is contained in:
parent
b988460a41
commit
c0a9e5134a
1 changed files with 6 additions and 1 deletions
|
|
@ -200,7 +200,12 @@ class CategoriesPresenter
|
|||
},
|
||||
{ t: Throwable? ->
|
||||
view.showProgress(false)
|
||||
view.showError(R.string.no_categories_found)
|
||||
view.showError(R.string.error_loading_categories)
|
||||
val mwException = t as? MwIOException
|
||||
view.showErrorDialog(
|
||||
if (mwException == null) ""
|
||||
else "\n${mwException.error.title} / ${mwException.error.details}"
|
||||
)
|
||||
Timber.e(t)
|
||||
},
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue