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