mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
fix an issue of initializing the calendar at wrong date if sunday is the first day
This commit is contained in:
@ -217,9 +217,8 @@ class MainActivity : SimpleActivity(), EventListFragment.DeleteListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun fillWeeklyViewPager() {
|
private fun fillWeeklyViewPager() {
|
||||||
val firstDayIndex = if (config.isSundayFirst) 7 else 1
|
val thisweek = DateTime().withDayOfWeek(1).withTimeAtStartOfDay().minusDays(if (config.isSundayFirst) 1 else 0)
|
||||||
val thisweek = DateTime().withDayOfWeek(firstDayIndex).withTime(0, 0, 0, 0).seconds()
|
val weekTSs = getWeekTimestamps(thisweek.seconds())
|
||||||
val weekTSs = getWeekTimestamps(thisweek)
|
|
||||||
val weeklyAdapter = MyWeekPagerAdapter(supportFragmentManager, weekTSs, object : WeekFragment.WeekScrollListener {
|
val weeklyAdapter = MyWeekPagerAdapter(supportFragmentManager, weekTSs, object : WeekFragment.WeekScrollListener {
|
||||||
override fun scrollTo(y: Int) {
|
override fun scrollTo(y: Int) {
|
||||||
week_view_hours_scrollview.scrollY = y
|
week_view_hours_scrollview.scrollY = y
|
||||||
|
Reference in New Issue
Block a user