mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 00:31:51 +01:00
Hide catalogue empty view properly (fixes #2783)
This commit is contained in:
parent
912629c2dc
commit
af937f2e31
@ -356,7 +356,6 @@ open class BrowseCatalogueController(bundle: Bundle) :
|
|||||||
if (catalogue_view != null) {
|
if (catalogue_view != null) {
|
||||||
val message = getErrorMessage(error)
|
val message = getErrorMessage(error)
|
||||||
val retryAction = View.OnClickListener {
|
val retryAction = View.OnClickListener {
|
||||||
empty_view.hide()
|
|
||||||
|
|
||||||
// If not the first page, show bottom progress bar.
|
// If not the first page, show bottom progress bar.
|
||||||
if (adapter.mainItemCount > 0 && progressItem != null) {
|
if (adapter.mainItemCount > 0 && progressItem != null) {
|
||||||
@ -378,8 +377,6 @@ open class BrowseCatalogueController(bundle: Bundle) :
|
|||||||
|
|
||||||
empty_view.show(message, actions)
|
empty_view.show(message, actions)
|
||||||
} else {
|
} else {
|
||||||
empty_view.hide()
|
|
||||||
|
|
||||||
snack = catalogue_view.snack(message, Snackbar.LENGTH_INDEFINITE) {
|
snack = catalogue_view.snack(message, Snackbar.LENGTH_INDEFINITE) {
|
||||||
setAction(R.string.action_retry, retryAction)
|
setAction(R.string.action_retry, retryAction)
|
||||||
}
|
}
|
||||||
@ -496,6 +493,7 @@ open class BrowseCatalogueController(bundle: Bundle) :
|
|||||||
* Hides active progress bars.
|
* Hides active progress bars.
|
||||||
*/
|
*/
|
||||||
private fun hideProgressBar() {
|
private fun hideProgressBar() {
|
||||||
|
empty_view.hide()
|
||||||
progress?.gone()
|
progress?.gone()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user