Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.

Commit d921cf2

Browse files
committed
Use getColumnIndexOrThrow for clarity
1 parent 458de45 commit d921cf2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/src/main/kotlin/at/bitfire/ical4android/AndroidEvent.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,9 +703,11 @@ abstract class AndroidEvent(
703703
var rebuild = false
704704
if (event.status == null)
705705
calendar.provider.query(eventSyncURI(), arrayOf(Events.STATUS), null, null, null)?.use { cursor ->
706-
if (cursor.moveToNext())
707-
if (!cursor.isNull(0)) // Events.STATUS != null
706+
if (cursor.moveToNext()) {
707+
val statusIndex = cursor.getColumnIndexOrThrow(Events.STATUS)
708+
if (!cursor.isNull(statusIndex))
708709
rebuild = true
710+
}
709711
}
710712

711713
if (rebuild) { // delete whole event and insert updated event

0 commit comments

Comments
 (0)