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

View File

@ -26,7 +26,7 @@ object Formatter {
val dateTime = getDateTimeFromCode(dayCode) val dateTime = getDateTimeFromCode(dayCode)
val day = dateTime.toString(DAY_PATTERN) val day = dateTime.toString(DAY_PATTERN)
val year = dateTime.toString(YEAR_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) var month = getMonthName(context, monthIndex)
if (shortMonth) if (shortMonth)
month = month.substring(0, Math.min(month.length, 3)) month = month.substring(0, Math.min(month.length, 3))