builttoroam / device_calendar

A cross platform plugin for modifying calendars on the user's device
https://pub.dev/packages/device_calendar
BSD 3-Clause "New" or "Revised" License
260 stars 263 forks source link

Fixed bug where DAILY freq gave a compile error #432

Closed alexthe2 closed 1 year ago

alexthe2 commented 1 year ago

The when branch was not exhaustive enough resulting in build errors when building for Android

e: C:\flutter\.pub-cache\hosted\pub.dartlang.org\device_calendar-4.2.0\android\src\main\kotlin\com\builttoroam\devicecalendar\CalendarDelegate.kt: (772, 9): 'when' expression must be exhaustive, add necessary 'DAILY', 'HOURLY', 'MINUTELY', 'SECONDLY' branches or 'else' branch instead

FAILURE: Build failed with an exception.

I have added an else condition throwing an exception to combat this issue:

else -> throw IllegalStateException("Only Freq WEEKLY, MONTHLY or YEARLY acceptable as a rfcRecurrenceRule!")
alexthe2 commented 1 year ago

I now also fixed it, and when it's Daily it adds all Days of the week

thomassth commented 1 year ago

Please rebase the commit, which should solve the build test error.

thomassth commented 1 year ago

Likely solved with #403.

Also not entirely sure what you meant, did not see any build errors like this recently.