also looking at this
feat(android): deleteCalendarEvent — the first action to answer through the channel
#155
7 files
+288
-3
| @@ -2350,6 +2350,10 @@ class CraftBridge( | ||
| 2350 | 2350 | |
| 2351 | 2351 | @JavascriptInterface |
| 2352 | 2352 | fun deleteCalendarEvent(eventId: String) { |
| 2353 | // Zig answers through the reply channel, so returning here is what | |
| 2354 | // stops the promise being settled twice. | |
| 2355 | if (CraftNative.deleteCalendarEvent(activity, eventId)) return | |
| 2356 | ||
| 2353 | 2357 | try { |
| 2354 | 2358 | val uri = ContentUris.withAppendedId(CalendarContract.Events.CONTENT_URI, eventId.toLong()) |
| 2355 | 2359 | activity.contentResolver.delete(uri, null, null) |