Skip to content

Commit

Permalink
Fix possible-nil return type of EventPermissionStrategy#getEntityType (
Browse files Browse the repository at this point in the history
…#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 <[email protected]>
  • Loading branch information
ChristianEdwardPadilla and mvanbeusekom authored Mar 26, 2024
1 parent 0ce5b3f commit 74e89c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion permission_handler_apple/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 9.4.4

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

## 9.4.3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,11 @@ + (PermissionStatus)permissionStatus:(PermissionGroup)permission {
}

+ (EKEntityType)getEntityType:(PermissionGroup)permission {
if (permission == PermissionGroupCalendar || permission == PermissionGroupCalendarFullAccess || permission == PermissionGroupCalendarWriteOnly) {
return EKEntityTypeEvent;
} else if (permission == PermissionGroupReminders) {
if (permission == PermissionGroupReminders) {
return EKEntityTypeReminder;
}

return nil;
return EKEntityTypeEvent;
}

@end
Expand Down

0 comments on commit 74e89c0

Please sign in to comment.