-
Notifications
You must be signed in to change notification settings - Fork 16
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
2350: Show snackbar instead of opening settings #2960
Conversation
@@ -41,7 +43,7 @@ export const requestPushNotificationPermission = async (): Promise<boolean> => { | |||
|
|||
if (permissionStatus !== RESULTS.GRANTED) { | |||
log(`Permission denied, disabling push notifications in settings.`) | |||
await appSettings.setSettings({ allowPushNotifications: false }) | |||
updateSettings({ allowPushNotifications: false }) |
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.
This led to unsynchronized settings.
Code Climate has analyzed commit 30ab681 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 55.7% (50% is the threshold). This pull request will bring the total coverage in the repository to 74.3%. View more on Code Climate. |
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 cool, thanks! Tested in emulated Android and real iOS
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.
Looks good, thanks for this PR.
Not tested as Leandra already did it. Only some small comments
…ttings # Conflicts: # native/src/utils/createSettingsSections.ts
Short description
Explain that the settings have to be changed in order to enable push notifications if the permissions are denied.
Also fixes a bug that the push notifications are shown as enabled even if the permissions are denied.
Proposed changes
appContext
settingsSide effects
None.
Testing
onPress
(can be tested by just throwing an error there)Resolved issues
Show snackbar instead of directly opening settings, refactor settings to
Fixes: #2350.