|
|
|
@ -112,12 +112,19 @@ class YearsFragment : Fragment() {
|
|
|
|
yearAdapter.submitList(data)
|
|
|
|
yearAdapter.submitList(data)
|
|
|
|
(requireActivity() as MainActivity).setActionBarSubtitle(objects.size.toString())
|
|
|
|
(requireActivity() as MainActivity).setActionBarSubtitle(objects.size.toString())
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
binding.swipeRefreshLayout.isRefreshing = false
|
|
|
|
if (e.message != null) {
|
|
|
|
if (data.isEmpty()) {
|
|
|
|
if (e.message != "results not cached") {
|
|
|
|
showAnimation(true, false)
|
|
|
|
binding.swipeRefreshLayout.isRefreshing = false
|
|
|
|
|
|
|
|
if (data.isEmpty()) {
|
|
|
|
|
|
|
|
showAnimation(true, false)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Toasty.error(myContext, "Abruf fehlgeschlagen", Toasty.LENGTH_SHORT).show()
|
|
|
|
|
|
|
|
Log.e("TechnikLogger.JahrSuche", e.message.toString())
|
|
|
|
|
|
|
|
e.printStackTrace()
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
Log.d("TechnikLogger.EinsSuche", "Empty cache, fetching data immediately.")
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Toasty.error(myContext, "Abruf fehlgeschlagen", Toasty.LENGTH_SHORT).show()
|
|
|
|
|
|
|
|
Log.e("TechnikLogger.JahrSuche", e.message.toString())
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|