mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-17 12:20:51 +01:00
set minimum event time to a month ago
This commit is contained in:
parent
04b389b46c
commit
eba27b2541
@ -35,7 +35,7 @@ class FetchGoogleEventsTask(val activity: Activity, credential: GoogleAccountCre
|
||||
}
|
||||
|
||||
private fun getDataFromApi(): List<Event> {
|
||||
val now = DateTime(System.currentTimeMillis())
|
||||
val now = DateTime(System.currentTimeMillis() - getMonthMillis())
|
||||
val events = service.events().list("primary")
|
||||
.setMaxResults(10)
|
||||
.setTimeMin(now)
|
||||
@ -53,4 +53,6 @@ class FetchGoogleEventsTask(val activity: Activity, credential: GoogleAccountCre
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun getMonthMillis() = 30 * 24 * 60 * 60 * 1000L
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user