lets fetch more events at the weekly view, rather than less
This commit is contained in:
parent
0c04f8ddc6
commit
098b945b55
1 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@ import android.content.Context
|
|||
import com.simplemobiletools.calendar.pro.extensions.eventsHelper
|
||||
import com.simplemobiletools.calendar.pro.interfaces.WeeklyCalendar
|
||||
import com.simplemobiletools.calendar.pro.models.Event
|
||||
import com.simplemobiletools.commons.helpers.DAY_SECONDS
|
||||
import com.simplemobiletools.commons.helpers.WEEK_SECONDS
|
||||
import java.util.*
|
||||
|
||||
|
@ -12,7 +13,7 @@ class WeeklyCalendarImpl(val callback: WeeklyCalendar, val context: Context) {
|
|||
|
||||
fun updateWeeklyCalendar(weekStartTS: Long) {
|
||||
val endTS = weekStartTS + 2 * WEEK_SECONDS
|
||||
context.eventsHelper.getEvents(weekStartTS, endTS) {
|
||||
context.eventsHelper.getEvents(weekStartTS - DAY_SECONDS, endTS) {
|
||||
mEvents = it
|
||||
callback.updateWeeklyCalendar(it)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue