-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Device Calendar Sync #2072
Device Calendar Sync #2072
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very existed about this feature!
Great Job! Code overall looks good to me.
); | ||
} | ||
|
||
Future<void> _refreshCalendar( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skipping review of _refreshCalendar
as not getting much idea of the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a shame, as this is the main part of the code ;)
if (calendars == null) { | ||
return []; | ||
} | ||
if (Platform.isAndroid) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for this platform specific condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, due to platform specific behaviors (iOS doesn't have any accountName
property) this will only be correct on Android.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had to update this slightly for iOS support. But nothing major. Also limiting our deleting to local calendars so we don't accidentally delete others ... like one they might have named "Acter" in their google calendar.
I take it. |
This PR brings syncing of all events not-denied to your device calendar on Android & iOS. See it in Action (the other app is the emulator Default Calendar App from Google):
device-calendar-integration-zero.mp4
It is behind a feature flag, that you can hard toggle to see and remove the calendar:
labs-flag.mp4
And on iOS (emulator) as well:
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-08-20.at.10.55.26.mp4
The following caveats apply:
yes
?)To the reviewer
Next to the actual feature the following refactors were necessary:
home_shell
into anapp_shell
that is moved toconfig
as it is about setting up the general infrastructure. Aside from moving the file and outsourcing the LogoutWidget (which is otherwise features wise untouched), this moves the_init
process to give us more executive control, like in this case make sure we are not asking for multiple permissions at the same time but after one another (notifications & calendar permission).