init the calendar in proper week if sunday is the first day
This commit is contained in:
parent
56139b722a
commit
505cd2e5af
|
@ -239,7 +239,10 @@ class MainActivity : SimpleActivity(), NavigationListener {
|
|||
}
|
||||
|
||||
private fun fillWeeklyViewPager() {
|
||||
val thisweek = DateTime().withDayOfWeek(1).withTimeAtStartOfDay().minusDays(if (config.isSundayFirst) 1 else 0)
|
||||
var thisweek = DateTime().withDayOfWeek(1).withTimeAtStartOfDay().minusDays(if (config.isSundayFirst) 1 else 0)
|
||||
if (DateTime().minusDays(7).seconds() > thisweek.seconds()) {
|
||||
thisweek = thisweek.plusDays(7)
|
||||
}
|
||||
val weekTSs = getWeekTimestamps(thisweek.seconds())
|
||||
val weeklyAdapter = MyWeekPagerAdapter(supportFragmentManager, weekTSs, object : WeekFragment.WeekScrollListener {
|
||||
override fun scrollTo(y: Int) {
|
||||
|
|
Loading…
Reference in New Issue