mirror of
https://github.com/etesync/android
synced 2025-01-11 00:01:12 +00:00
Allow null values for IS_ORGANIZER
This commit is contained in:
parent
e82d8affe8
commit
17d90a4569
@ -103,9 +103,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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user