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

Chore: Unify PushNoficationSettingsScreen and NotificationSettingsUi & unsaved changes dialog #287

Merged
merged 6 commits into from
Jan 17, 2025

Conversation

julian-wls
Copy link
Contributor

@julian-wls julian-wls commented Jan 10, 2025

Problem Description

As mentioned in #273 there a two composable functions right now, which both use PushNotificationSettingsUi to display notification settings.

Changes

This PR combines both functions into a new function called PushNotificationSettingsScreen.
Moreover, a new dialog has been added to warn users if there are unsaved changes after adjusting their notification settings.

Steps for testing

  1. Log in to the App
  2. Verify that the Notification Configuration after the login still works as expected
  3. Verify that the Notification Settings in the app still work as expected
  4. Verify that after changing the settings and not saving them, the dialog shows up and saves the changes if 'Yes' is selected

…n a new composable and added unsaved changes dialog
@julian-wls julian-wls self-assigned this Jan 10, 2025
@julian-wls julian-wls linked an issue Jan 10, 2025 that may be closed by this pull request
@julian-wls julian-wls marked this pull request as ready for review January 10, 2025 13:42
@julian-wls julian-wls added the ready for review This PR can be reviewed label Jan 10, 2025
Copy link
Collaborator

@FelberMartin FelberMartin left a comment

Choose a reason for hiding this comment

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

Thank you for taking care of this, it really confused me that we previously had two very similar composables for this :D

Just some minor code comments and two general remarks:

  1. I noticted that the Unsaved changes dialog only appear when navigating back via the arrow in the top left, but not with the Android back button.
  2. When making some changes, then turning on airplane mode, and navigating back, the dialog shows. When I press "Yes/Save" I get taken back to the settings screen, but the changes are actually not synced to the server. Maybe we should stay on the notificationSettingsScreen until the syncing is successful, or display an error message otherwise

Copy link
Collaborator

@FelberMartin FelberMartin left a comment

Choose a reason for hiding this comment

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

Lgtm now!

@FelberMartin FelberMartin added ready to merge This PR can be merged and removed ready for review This PR can be reviewed labels Jan 16, 2025
@FelberMartin FelberMartin merged commit faf48d4 into develop Jan 17, 2025
5 checks passed
@FelberMartin FelberMartin deleted the chore/unite-notification-settings branch January 17, 2025 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge This PR can be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unite PushNotificationSettingsScreen and NotificationSettingsUi
2 participants