Skip to content

Commit 74e89c0

Browse files
Fix possible-nil return type of EventPermissionStrategy#getEntityType (#1278)
* Update pubspec.yaml * Update CHANGELOG.md * Fix return type of EventPermissionStrategy#getEntityType This method is causing a compilation warning: -Wint-conversion. Even ignoring the warning, the nil value would not be tolerated and is never actually returned. --------- Co-authored-by: Maurits van Beusekom <maurits@vnbskm.nl>
1 parent 0ce5b3f commit 74e89c0

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

permission_handler_apple/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 9.4.4
22

3-
* Fixes typo in comment for full calendar access.
3+
* Fixes potentially-nil return type of EventPermissionStrategy#getEntityType.
4+
* * Fixes typo in comment for full calendar access.
45

56
## 9.4.3
67

permission_handler_apple/ios/Classes/strategies/EventPermissionStrategy.m

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,11 @@ + (PermissionStatus)permissionStatus:(PermissionGroup)permission {
133133
}
134134

135135
+ (EKEntityType)getEntityType:(PermissionGroup)permission {
136-
if (permission == PermissionGroupCalendar || permission == PermissionGroupCalendarFullAccess || permission == PermissionGroupCalendarWriteOnly) {
137-
return EKEntityTypeEvent;
138-
} else if (permission == PermissionGroupReminders) {
136+
if (permission == PermissionGroupReminders) {
139137
return EKEntityTypeReminder;
140138
}
141139

142-
return nil;
140+
return EKEntityTypeEvent;
143141
}
144142

145143
@end

0 commit comments

Comments
 (0)