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.
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:
Regression tested the push notifications pane to ensure that it is displayed correctly:
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.
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.
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:
Regression tested the push notifications pane to ensure that it is displayed correctly:
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:
PreferencesViewController
toHotkeyPreferencesViewController
. Now that we have general and hokey preference panes, it makes sense to give a more descriptive name.guard let variable
syntax instead of the legacyguard let variable = variable
to unwrap optionals.