minor code style update

This commit is contained in:
tibbi 2018-10-23 23:39:45 +02:00
parent 8c7cb93191
commit c983014198
2 changed files with 5 additions and 3 deletions

View File

@ -93,7 +93,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
}
swipe_refresh_layout.setOnRefreshListener {
refreshCalDAVCalendars(false)
refreshCalDAVCalendars(false)
}
if (!checkViewIntents()) {
@ -261,7 +261,9 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
intent.removeExtra(DAY_CODE)
if (dayCodeToOpen.isNotEmpty()) {
calendar_fab.beVisible()
if (viewToOpen != LAST_VIEW) {config.storedView = viewToOpen}
if (viewToOpen != LAST_VIEW) {
config.storedView = viewToOpen
}
updateViewPager(dayCodeToOpen)
return true
}

View File

@ -26,7 +26,7 @@ object Formatter {
val dateTime = getDateTimeFromCode(dayCode)
val day = dateTime.toString(DAY_PATTERN)
val year = dateTime.toString(YEAR_PATTERN)
val monthIndex = Integer.valueOf(dayCode.substring(4, 6))!!
val monthIndex = Integer.valueOf(dayCode.substring(4, 6))
var month = getMonthName(context, monthIndex)
if (shortMonth)
month = month.substring(0, Math.min(month.length, 3))