minor code style update
This commit is contained in:
parent
8c7cb93191
commit
c983014198
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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))
|
||||||
|
|
Loading…
Reference in New Issue