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

Bluetooth settings: handle missing permissions / avoid crash #1638

Merged

Conversation

khao-soi
Copy link
Contributor

@khao-soi khao-soi commented Jul 11, 2023

fixes #1637

@dennisguse what do you think?

@khao-soi khao-soi changed the title Bluetooth settings: handle missing permissions Bluetooth settings: handle missing permissions / avoid crash Jul 11, 2023
@dennisguse
Copy link
Member

I would switch the if aka first check the negative case and return. This way we avoid the else and the 2nd if.

An additional option is to to disable these options if permissions are not granted (and likely set a proper preference summary).

@khao-soi
Copy link
Contributor Author

I would switch the if aka first check the negative case and return. This way we avoid the else and the 2nd if.

Good point. I have revised the code.

@dennisguse
Copy link
Member

And again: make it one commit only.
The code is that simple to understand that two commits make git history hard to read ;)

@khao-soi khao-soi force-pushed the bugifx/bluetooth-permissions branch from 79d8d64 to 8198f33 Compare July 12, 2023 16:14
@khao-soi khao-soi force-pushed the bugifx/bluetooth-permissions branch from 8198f33 to 7e7c29e Compare July 12, 2023 16:18
@dennisguse dennisguse merged commit 77719f5 into OpenTracksApp:main Jul 15, 2023
1 check passed
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.

Setting of Bluetooth Sensors causes crash
2 participants