... to shared container instead of migrating This commit is a reimplementation of DamusUserDefaults that mirrors settings from the app to the shared container (instead of migrating values over). This new implementation brings the benefit of being backwards compatible with the user's settings. That is, even if the user upgrades or downgrades between various versions and changes settings along the way, the main settings in the app will stay consistent between Damus versions — that is, changes to the settings would not be lost between downgrades/upgrades General settings test ---------------------- PASS Device: iPhone 15 Pro simulator iOS: 17.0.1 Damus: This commit Setup: A device with non-standard settings Steps: 1. Flash Damus on the device 2. Check any non-default settings that were there before. Ensure that settings remained the same. PASS 3. Change one setting (any setting) to a non-default value 4. Restart Damus 5. Ensure settings change in step 3 persisted on the device Notification settings test -------------------------- PASS Device: iPhone 15 Pro simulator iOS: 17.0.1 Damus: This commit Setup: - Two phones running Damus on different accounts - Local relay with strfry-push-notify test setup - Apple push notification test tool Coverage: 1. Mention notifications 2. DM notifications 3. Reaction notifications 4. Repost notifications Steps for each notification type: 1. Use the secondary phone to generate a push notification 2. Trigger the push notification (Send push notification from test tool) 3. Ensure that the notification is received on the other device 4. Turn off notifications for that notification type on settings 5. Trigger the same push notification (Resend push notification from test tool) 6. Ensure that the notification is not received on the other device 7. Turn on notifications for that notification type on settings 8. Trigger the same push notification (Resend from test tool) 9. Ensure that notification appears on the device Result: PASS (notifications are received when enabled and not received when disabled) Signed-off-by: Daniel D’Aquino <daniel@daquino.me> Signed-off-by: William Casarin <jb55@jb55.com>
333 KiB
333 KiB