Skip to content
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

Remove faulty requestPermissions implementation in favor of working one #465

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

tjarvstrand
Copy link
Contributor

@tjarvstrand tjarvstrand commented Dec 31, 2022

Tthe current Swift-implentation of requestPermissions does not return if permissions have already been granted. Thus, if it is called more than once, subsequent attempts try to request permissions again, causing the call to fail with a 400-error (To create or update an all day event you must provide calendar ID, event with a title and event's start date).

There was already a second implementation of requestPermissions which wasn't used anywhere but correctly short-circuits if permissions have already been granted so I thought it would be better to use that.

EDIT: Actually, the errors seem to be caused by an error on my end. Regardless, this change seems reasonable to me, if less urgent :)

@IVLIVS-III
Copy link
Contributor

Thanks for the PR, looks good on first glance. I will try and test it soon.

Copy link
Contributor

@IVLIVS-III IVLIVS-III left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@IVLIVS-III IVLIVS-III merged commit c7300b0 into builttoroam:develop Jan 30, 2023
@IVLIVS-III
Copy link
Contributor

Thank you for your contribution @tjarvstrand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants