mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
avoid crashing at attempting to print an empty event list view
This commit is contained in:
@@ -230,6 +230,11 @@ class EventListFragment : MyFragmentHolder(), RefreshRecyclerViewListener {
|
||||
|
||||
override fun printView() {
|
||||
mView.apply {
|
||||
if (calendar_events_list.isGone()) {
|
||||
context.toast(R.string.no_items_found)
|
||||
return@apply
|
||||
}
|
||||
|
||||
(calendar_events_list.adapter as? EventListAdapter)?.togglePrintMode()
|
||||
Handler().postDelayed({
|
||||
context!!.printBitmap(calendar_events_list.getViewBitmap())
|
||||
|
Reference in New Issue
Block a user