Skip to content

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

Open
sprejjs wants to merge 1 commit intosteve228uk:masterfrom
sprejjs:feat-control-notifications
Open

(FEAT) Allow turning off push notifications in app preferences#179
sprejjs wants to merge 1 commit intosteve228uk:masterfrom
sprejjs:feat-control-notifications

Conversation

@sprejjs
Copy link
Copy Markdown

@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