adding a crashfix

This commit is contained in:
tibbi 2019-01-25 23:14:59 +01:00
parent da4742e7b5
commit 712cafbee8
2 changed files with 5 additions and 1 deletions

View file

@ -52,7 +52,7 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:5.6.16'
implementation 'com.simplemobiletools:commons:5.6.17'
implementation 'joda-time:joda-time:2.10.1'
implementation 'androidx.multidex:multidex:2.0.1'

View file

@ -102,6 +102,10 @@ class EventListFragment : MyFragmentHolder(), RefreshRecyclerViewListener {
val listItems = context!!.getEventListItems(mEvents)
activity?.runOnUiThread {
if (activity == null) {
return@runOnUiThread
}
val currAdapter = mView.calendar_events_list.adapter
if (currAdapter == null || forceRecreation) {
EventListAdapter(activity as SimpleActivity, listItems, true, this, mView.calendar_events_list) {