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

(FEAT) Allow turning off push notifications in app preferences #179

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sprejjs
Copy link

@sprejjs sprejjs commented Nov 27, 2022

Problem statement

Personally, I find push notifications for each new song to be a bit distracting, but I understand that others may like to have them.

Proposed solution

I've added a general preference pane that includes a setting to toggle the push notifications on and off. It's enabled by default to preserve the previous behaviour for existing users.

Evidence of testing

Ensured that the push notifications are still being displayed when the setting is turned on.
Screenshot 2022-11-27 at 11 31 46

Checked that the notifications aren't being displayed when the preference is turned off (no screenshot).

Ensured that the new pane displays remembers the last setting:
Screenshot 2022-11-27 at 11 07 01

Regression tested the push notifications pane to ensure that it is displayed correctly:
Screenshot 2022-11-27 at 11 20 06

Additional changes

While working through the preference changes, I've noticed a few things that could be improved, so I've included them here. Let me know if you'd rather not have them or have them in a separate PR:

  • Ignoring all *.DS_Store file from version control.
  • Renamed PreferencesViewController to HotkeyPreferencesViewController. Now that we have general and hokey preference panes, it makes sense to give a more descriptive name.
  • Added missing auto layout constraints in the preference pane. Some of the trailing constraints were missing forcing us to specify the height of the view controller. Once I added the missing constraints, I was able to remove the code that was setting the height of the view.
  • I've used the modern guard let variable syntax instead of the legacy guard let variable = variable to unwrap optionals.

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.

1 participant