Commit 3132ffbd authored by Ricki Hirner's avatar Ricki Hirner 🐑
Browse files

Allow null values for IS_ORGANIZER

parent d553e184
Pipeline #7715589 passed with stage
in 15 minutes and 40 seconds
......@@ -73,9 +73,10 @@ public class LocalEvent extends AndroidEvent implements LocalResource {
event.uid = values.getAsString(COLUMN_UID);
event.sequence = values.getAsInteger(COLUMN_SEQUENCE);
if (Build.VERSION.SDK_INT >= 17)
weAreOrganizer = values.getAsInteger(Events.IS_ORGANIZER) != 0;
else {
if (Build.VERSION.SDK_INT >= 17) {
Integer isOrganizer = values.getAsInteger(Events.IS_ORGANIZER);
weAreOrganizer = isOrganizer != null && isOrganizer != 0;
} else {
String organizer = values.getAsString(Events.ORGANIZER);
weAreOrganizer = organizer == null || organizer.equals(calendar.account.name);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment