Commit Graph

57 Commits

Author SHA1 Message Date
Daniel D’Aquino
54674104ea Change DamusUserDefaults to mirror settings from app container
... 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>
2024-01-10 11:07:01 -08:00
William Casarin
b40c595a7c notify: switch over to new typesafe notifications 2023-07-30 11:02:44 -07:00
William Casarin
c0f9b0a8c0 views: allow embeddable views at top of timeline
This allows you to put stuff at the top of a timeline inside the scroll
view. We could also remove the scrollview from the timeline
eventually... but this works for now.
2023-07-13 06:56:23 -07:00
William Casarin
f702733654 nav: remove environmentObjects
environment objects are implicit arguments that cannot be checked by the
compiler. They are a common source of crashes. Use a main
NavigationCoordinator in DamusState for the core app, and pass in other
coordinators in the account setup view for the parts of the app that
don't have a DamusState.
2023-06-30 09:59:58 -07:00
Scott Penrose
0018e7ad57 Convert remaining navigation links 2023-06-30 06:42:56 -07:00
William Casarin
3db77a16a0 Fix timeline from moving when you're scrolling 2023-06-24 17:39:24 +02:00
William Casarin
51a58360f9 debug slow scroll 2023-06-20 15:29:44 +02:00
Bryan Montz
9847f12c95 Remove unused code
Closes: #1105
2023-05-08 11:01:04 -07:00
William Casarin
4b5c217213 Add scroll queue detection in notification view
This will stop injecting events into the timeline if you're scrolling
2023-02-26 14:14:25 -08:00
William Casarin
37b964c296 Fix issue where CPU is continuously pegged when scrolling
Since should_queue is continuosly getting set, this is causing the
InnerTimelineView to continuously rerender, pegging the CPU to 100%

This change only updates the var if it changes from the previous value.
2023-02-21 05:07:27 -08:00
William Casarin
647495dbc0 Fix bug where feed sometimes gets reset to realtime when scrolling 2023-02-20 14:58:10 -08:00
William Casarin
826fd1ef33 More consistent scrolling to top behavior 2023-02-20 14:26:45 -08:00
William Casarin
54dd2035a1 Always flush events when switching timelines 2023-02-20 14:21:21 -08:00
William Casarin
587819c8eb Always switch to realtime mode on scroll-to-top, remove realtime indicator 2023-02-20 13:51:54 -08:00
William Casarin
8954c1c245 Remove load more popup 2023-02-20 13:48:36 -08:00
William Casarin
b4140dc5f2 Add a "load more" button instead of always inserting events in timelines
Changelog-Added: Add a "load more" button instead of always inserting events in timelines
2023-02-20 11:12:31 -08:00
OlegAba
d547dade04 Use top anchor for scroll to top event
Changelog-Fixed: Scroll to top of events instead of the bottom
Closes: #570
2023-02-16 08:29:25 -08:00
OlegAba
94a67adff9 Fix padding 2023-02-16 08:29:21 -08:00
William Casarin
5edb7df5c4 Mute events in threads
Changlog-Added: Mute events in threads
2023-01-27 12:11:57 -08:00
William Casarin
8df5bf04ae refactor: Break EventView into 3 separate views
SelectedEventView
EmbeddedEventView
EventView
2023-01-23 12:13:58 -08:00
Ben Weeks
fb1f99e728 Fixed Jack's issue with homepage gap at the top.
Closes: #328
Changelog-Fixed: Fix padding issue at top of home timeline
2023-01-18 09:59:26 -08:00
William Casarin
b70ce53b88 navigation: fix navigation popping issues in threads
Changelog-Fixed: Fix navigation popping in threads
2023-01-03 23:00:22 -08:00
William Casarin
abf736ec2a Fix bug where boost event is loaded in the thread instead of the boosted event
Changelog-Fixed: Fix bug where boost event is loaded in the thread instead of the boosted event
2023-01-02 18:58:23 -08:00
Thomas
d1cbf74840 Improved visual composition for threads
Changelog-Changed: Improve visual composition of threads
2022-12-27 14:41:28 -08:00
Sam DuBois
549cbb9bce Fix issue with loading view using the redacted modifier
Also tried to make some adjusmtents to the refresh subscribtion to see
if this fixes bugs people were having

Closes: #119

Changelog-Fixed: Fixed issues when refreshing global view
2022-12-22 18:10:42 -08:00
Sam DuBois
8e4daa79a8 Fixed the shimmering bug 2022-12-20 09:39:29 -07:00
Sam DuBois
3a1d4b1c39 Removed the app viewModel. Need to find a better structure for the future to fix this issue 2022-12-20 09:20:37 -07:00
Sam DuBois
0f64792585 Everything looking really clean. tested and working in dark mode as well 2022-12-18 22:00:48 -07:00
Sam DuBois
2906fecf5c Realized that I didn't actually need to move everything out into a view model. Well oh well im sure it will come in handy eventually 2022-12-18 18:35:03 -07:00
Sam DuBois
5d0e5c32ed DONE 🙌 2022-12-18 17:01:58 -07:00
Sam DuBois
fbde055fc6 Making some changes to the view model. braking but we will survive 2022-12-18 16:37:53 -07:00
Sam DuBois
d7d8076bee Adding a small empty timeline view to make it more obvious when there is no content and when there is content 2022-12-18 09:40:34 -08:00
Jacob Davis
2c44366ca5 Fix padding and other minor UI improvements 2022-12-17 17:03:16 -08:00
William Casarin
8ea01b43a0 timeline: fix scrolling-to-top when view is filtered 2022-11-18 19:07:12 -08:00
James Carucci
72900894c0 Add replies filter and tabs
Closes: #31
Changelog-Added: Tabs to switch between posts and replies in home view
Signed-off-by: William Casarin <jb55@jb55.com>
2022-09-14 07:48:20 -07:00
William Casarin
7bdd8048b0 better channels
Signed-off-by: William Casarin <jb55@jb55.com>
2022-09-13 17:23:56 -07:00
William Casarin
d7b5669ecf support kind 42 chat messages
Changelog-Added: Support kind 42 chat messages (ArcadeCity).
Signed-off-by: William Casarin <jb55@jb55.com>
2022-08-19 07:21:18 -07:00
William Casarin
8141a2970c Revert "Add filters for home screen"
This reverts commit 12eb50255a.
2022-08-16 12:26:32 -07:00
James Carucci
12eb50255a Add filters for home screen
Closes: #25
Changelog-Added: Added ability to hide replies on home timeline
2022-08-15 16:54:46 -07:00
William Casarin
39ab555a77 Fix loading bug when opening boosted posts
Changelog-Fixed: Fixed thread loading issue when clicking on boosts
Signed-off-by: William Casarin <jb55@jb55.com>
2022-08-10 12:11:04 -07:00
William Casarin
22cad4b072 wot: show friend icons is some views
easier to detect if someone is trying to fake us out

Changelog-Added: Friend icons next to names on some views. Check is friend. Arrows are friend-of-friends
Signed-off-by: William Casarin <jb55@jb55.com>
2022-08-09 16:48:47 -07:00
William Casarin
9420a7a0ad Show chatroom first if content contains #chat
Changelog-Added: Load chat view first if content contains #chat
Signed-off-by: William Casarin <jb55@jb55.com>
2022-08-09 16:08:05 -07:00
William Casarin
b7513f28fa remove padding on main view
Changedlog-Changed: Removed left/right padding on main timeline
Signed-off-by: William Casarin <jb55@jb55.com>
2022-08-06 23:04:21 -07:00
William Casarin
c122035851 Implement NIP04: Encrypted Direct Messages
Closes #5

This adds encrypted direct message support to damus

Changelog-Added: Implement NIP04: Encrypted Direct Messages
Signed-off-by: William Casarin <jb55@jb55.com>
2022-07-02 12:14:36 -07:00
William Casarin
dd7d9a4a66 eose loading spinners
Changelog-Added: Add [NIP-15](https://github.com/nostr-protocol/nips/blob/master/15.md) loading spinners
Signed-off-by: William Casarin <jb55@jb55.com>
2022-06-18 08:49:50 -07:00
William Casarin
6ac4214be7 insert sort, profile updates revamp
Signed-off-by: William Casarin <jb55@jb55.com>
2022-05-09 10:33:03 -07:00
William Casarin
300463ef55 break profile view so that I fix it
Signed-off-by: William Casarin <jb55@jb55.com>
2022-05-08 19:31:25 -07:00
William Casarin
4db06b015c event mentions working
Signed-off-by: William Casarin <jb55@jb55.com>
2022-05-07 17:48:00 -07:00
William Casarin
f42bc2e91e likes, mention parsing, lots of stuff
Signed-off-by: William Casarin <jb55@jb55.com>
2022-05-04 16:26:10 -07:00
William Casarin
403fa74f8d just use stack navigationview
it seems less buggy

Signed-off-by: William Casarin <jb55@jb55.com>
2022-04-30 12:15:44 -07:00