Tweak error button appearance

This commit is contained in:
arkon
2020-03-29 12:10:36 -04:00
parent 920ffa8c24
commit e86103fdcc
3 changed files with 13 additions and 9 deletions

View File

@@ -366,15 +366,17 @@ open class BrowseCatalogueController(bundle: Bundle) :
}
presenter.requestNext()
}
val openInWebViewAction = View.OnClickListener {
openInWebView()
}
if (adapter.isEmpty) {
empty_view.show(message, listOf(
EmptyView.Action(R.string.action_retry, retryAction),
EmptyView.Action(R.string.action_open_in_web_view, openInWebViewAction)
))
val actions = mutableListOf(EmptyView.Action(R.string.action_retry, retryAction))
if (presenter.source is HttpSource) {
val openInWebViewAction = View.OnClickListener {
openInWebView()
}
actions += EmptyView.Action(R.string.action_open_in_web_view, openInWebViewAction)
}
empty_view.show(message, actions)
} else {
empty_view.hide()