Fix calendar widget
This commit is contained in:
parent
966d43d4d1
commit
6cbf37a9f9
@ -72,7 +72,7 @@ internal class CalendarRepositoryImpl(
|
|||||||
if (it) {
|
if (it) {
|
||||||
val events = withContext(Dispatchers.IO) {
|
val events = withContext(Dispatchers.IO) {
|
||||||
queryCalendarEvents(
|
queryCalendarEvents(
|
||||||
query = "",
|
query = null,
|
||||||
intervalStart = from,
|
intervalStart = from,
|
||||||
intervalEnd = to,
|
intervalEnd = to,
|
||||||
limit = limit,
|
limit = limit,
|
||||||
@ -116,7 +116,7 @@ internal class CalendarRepositoryImpl(
|
|||||||
if (query != null) selection.add("${CalendarContract.Instances.TITLE} LIKE ?")
|
if (query != null) selection.add("${CalendarContract.Instances.TITLE} LIKE ?")
|
||||||
if (excludeCalendars.isNotEmpty()) selection.add("${CalendarContract.Instances.CALENDAR_ID} NOT IN (${excludeCalendars.joinToString()})")
|
if (excludeCalendars.isNotEmpty()) selection.add("${CalendarContract.Instances.CALENDAR_ID} NOT IN (${excludeCalendars.joinToString()})")
|
||||||
if (excludeAllDayEvents) selection.add("${CalendarContract.Instances.ALL_DAY} = 0")
|
if (excludeAllDayEvents) selection.add("${CalendarContract.Instances.ALL_DAY} = 0")
|
||||||
val selArgs = if (query != null) null else arrayOf("%$query%")
|
val selArgs = if (query != null) arrayOf("%$query%") else null
|
||||||
val sort =
|
val sort =
|
||||||
"${CalendarContract.Instances.BEGIN} ASC" + if (limit > -1) " LIMIT $limit" else ""
|
"${CalendarContract.Instances.BEGIN} ASC" + if (limit > -1) " LIMIT $limit" else ""
|
||||||
val cursor = context.contentResolver.query(
|
val cursor = context.contentResolver.query(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user