mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-17 12:20:51 +01:00
adding some crashfixes
This commit is contained in:
parent
decfcbe1bf
commit
12e09bdb73
@ -48,7 +48,10 @@ class EventListWidgetAdapter(val context: Context) : RemoteViewsService.RemoteVi
|
||||
setupListEvent(remoteView, event)
|
||||
} else {
|
||||
remoteView = RemoteViews(context.packageName, R.layout.event_list_section_widget)
|
||||
setupListSection(remoteView, events[position] as ListSection)
|
||||
val section = events.getOrNull(position) as? ListSection
|
||||
if (section != null) {
|
||||
setupListSection(remoteView, section)
|
||||
}
|
||||
}
|
||||
|
||||
return remoteView
|
||||
|
@ -164,8 +164,10 @@ class WeekFragment : Fragment(), WeeklyCalendar {
|
||||
}
|
||||
|
||||
fun updateCalendar() {
|
||||
if (context != null) {
|
||||
WeeklyCalendarImpl(this, context!!).updateWeeklyCalendar(weekTimestamp)
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupDayLabels() {
|
||||
var curDay = Formatter.getDateTimeFromTS(weekTimestamp)
|
||||
|
Loading…
x
Reference in New Issue
Block a user