Commit Graph

69 Commits

Author SHA1 Message Date
ericholguin
a80ddc08ec settings: add media previews setting
Closes: https://github.com/damus-io/damus/pull/1757
Signed-off-by: William Casarin <jb55@jb55.com>
2023-11-23 10:57:23 -08:00
Daniel D’Aquino
ad75d8546c Add experimental push notification support
I added support for the experimental push notifications feature. There are many improvements to be made, so this feature is currently opt-in only. If the user does not opt-in, their device tokens will not be sent out and thus they will receive no push notifications.

We should perform more testing on real-life staging environments before fully releasing this feature.

Testing
-------

Testing was done gradually during development.

Device: iOS simulators
iOS: 17
Damus version: A few different but recent prototypes
Rough coverage:
1. Checked that no device tokens are sent out when setting is off
2. Checked that I can successfully receive device tokens when feature is ON and set to localhost.
3. Checked sending test push notifications of types "note" (kind: 1), reaction (kind: 7) and DMs (kind 4) works and shows a generic but reasonable push notification message
4. Checked that clicking on the notifications above take the user to the correct screen

Closes: https://github.com/damus-io/damus/issues/67
Changelog-Added: Add experimental push notification support
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
Signed-off-by: William Casarin <jb55@jb55.com>
2023-11-20 10:32:33 -08:00
Daniel D’Aquino
b2e555284b Add "Always show onboarding suggestions" developer setting
This commit adds a new setting that can be used by developers to test onboarding suggestions without having to make local changes to code or reinstall the app.

Testing
-------

Device: iPhone 15 Pro (Simulator)
iOS: 17.0.1
Damus: This commit
Coverage:
1. Starting the existing app under the default setting does not show onboarding suggestions
2. Turning the setting ON causes the app to show onboarding suggestions on every app restart
3. Turning the setting back OFF causes the app to no longer show onboarding suggestions

Changelog-Added: Add "Always show onboarding suggestions" developer setting
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
Reviewed-by: William Casarin <jb55@jb55.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2023-11-11 20:23:29 -08:00
Daniel D’Aquino
bbccc27a26 ui: Add setting that allows users to optionally disable profile action sheets.
Tested on iOS 17.0.1 on an iPhone 15 Pro simulator.

Closes: https://github.com/damus-io/damus/issues/1641
Changelog-Added: Add setting that allows users to optionally disable the new profile action sheet feature
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
Reviewed-by: William Casarin <jb55@jb55.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2023-10-24 12:18:20 +08:00
Mazin
957ac1dc03 Add translate.nostr.wine to available translation services
Closes: https://github.com/damus-io/damus/pull/1113
Signed-off-by: William Casarin <jb55@jb55.com>
2023-10-02 12:34:08 -07:00
a58ca2918a Remove nonfunctional LibreTranslate servers
Signed-off-by: Terry Yiu <git@tyiu.xyz>
Reviewed-by: William Casarin <jb55@jb55.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2023-10-02 12:34:08 -07:00
Daniel D’Aquino
49283f2bb2 filters: add "Do not show #nsfw tagged posts" setting
This commit adds a setting where the user can choose to hide notes with
a #nsfw hashtag. This setting was implemented to allow users to filter
out adult or other unsafe content.

I moved the code logic for content filtering into a new file, and
defined a protocol for content filters. Although the logic is still
simple, this might help in developing a flexible API in case we have
more complex filtering needs in the future.

I also modified the name of the "Appearance" setting to "Appearance and
filters", to make it easier for users to intuitively find this setting.
(Note: Re-translations of this string might be necessary)

**PASS**
**iOS:**
- iOS 17.0 (iPhone 14 Pro)

**Damus:** (This commit)
**Steps:**
1. Follow another account that you control (Account B)
2. On account B, post a note saying "#test this is a test". This note should show up on the home feed.
3. On account B, post a note saying "#nsfw this is a test". This note should NOT show up on the home feed
4. Go to settings and disable the NSFW filter. Go back to the home view. The #nsfw post should now show up.
5. Close app and reopen. NSFW post should still show up (i.e. Setting should be persistent)
6. Unfollow account B
7. Close app and reopen.
8. Follow the "#grownostr" hashtag
9. Turn on the NSFW filter
10. On account B, post a note saying "#grownostr this is a test". This note should show up on the home view.
11. On account B, post a note saying "#grownostr #nsfw this is a test". This note should NOT show up.
12. Double-check the "notes and replies" tab. Note should NOT show up there either.
12. Turn off NSFW filter
13. Note from step 11 should now show up.
14. Go to Universe view and find a post with a hashtag. Remember where the post is.
14. Locally change the tag keyword from "nsfw" to that hashtag (Note: I had to test this way because my posts were not showing up in the Universe view)
15. Turn off the filter. Check post is there, in the Universe view.
16. Turn on the filter. Check post is no longer there in the Universe view. (Check the neighboring posts are the same, to make sure)
17. Bring back the code to its normal state.
18. Search for "#nsfw". Make sure that #nsfw appears (I believe this is ok, because it means the person is purposefully searching for it)

Closes: https://github.com/damus-io/damus/issues/1412
Changelog-Added: Add "Do not show #nsfw tagged posts" setting
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
Signed-off-by: William Casarin <jb55@jb55.com>
2023-09-21 09:10:06 -04:00
William Casarin
d02fc9142d status: add settings for disabling statuses in the UI
Suggested-by: Tanel
Changelog-Added: Add settings for disabling user statuses
2023-08-23 16:43:55 -07:00
William Casarin
14ba33674b setting: adjustable font size for jack the zapper
Changelog-Added: Adjustable font size
2023-08-03 18:38:20 -07:00
William Casarin
7040235605 refactor: add Pubkey, Privkey, NoteId string aliases
This is a non-behavioral change in preparation for the actual switchover
from Strings to Ids. The purpose of this kit is to reduce the size of
the switchover commit which is going to be very large.
2023-07-31 05:38:19 -07:00
Suhail Saqan
d11cd76e6a Add multiple reaction support
Changelog-Added: Add support for multiple reactions
Closes: https://github.com/damus-io/damus/issues/1335
2023-07-29 10:03:55 -07:00
William Casarin
4033ad66ba test: fix crash in ci 2023-07-17 13:25:56 -07:00
William Casarin
1135c19fea test: add setting property tests
Some initial UserSettingsStore property tests
2023-07-16 13:05:18 -07:00
Bryan Montz
ebcfe3c25f add developer mode view and setting
Signed-off-by: Bryan Montz <bryanmontz@me.com>
2023-07-07 09:02:52 -07:00
William Casarin
30e33a01c1 nostrscript: add a helper function 2023-07-03 16:59:50 -07:00
William Casarin
a6cbf50def settings: record bool option keys
so that NostrScripts know which bool settings can be set
2023-07-03 16:28:25 -07:00
William Casarin
216029410b nozaps: add nozaps setting
This will be used to restore functionality in the future
2023-06-23 20:46:27 +02:00
William Casarin
e023d1e9cb settings: turn off wallet selector by default
This is a bit confusing for new users
2023-06-23 11:46:42 +02:00
Ben Weeks
06ba0f7387 Add ability to show multiple posts per user in Universe
ChangeLog-Added: Add ability to show multiple posts per user in Universe
Closes: #1198
Fixes: #1189
2023-05-29 15:35:29 -07:00
William Casarin
5aa0d6c3e1 settings: add donation_percent to settings
This will be used in damus donations splits
2023-05-14 22:24:12 -07:00
f9982e992a Migrate away from sticky deprecated non-pubkey-scoped settings
Changelog-Fixed: Migrate away from sticky deprecated non-pubkey-scoped settings
Closes: #1124
2023-05-14 21:08:56 -07:00
William Casarin
8fb5b4f49c misc logs 2023-05-14 00:03:51 -07:00
William Casarin
996312cf1c settings: Add nostr_wallet_connect setting
Stored in the keychain for security
2023-05-10 14:07:24 -07:00
Bryan Montz
e4860f3ba8 Replace Vault dependency with @KeychainStorage property wrapper
Changelog-Changed: replace Vault dependency with @KeychainStorage property wrapper
Closes: #1076
2023-05-04 15:57:02 -07:00
Bryan Montz
c679be9644 Top-level tab state restoration
Changelog-Added: Top-level tab state restoration
Closes: #634
2023-05-01 15:22:54 -07:00
William Casarin
1ca0519e25 Event Preloading
Changelog-Added: Added event preloading when scrolling
Changelog-Added: Preload images so they don't pop in
Changelog-Fixed: Fixed preview elements popping in
Changelog-Changed: Cached various UI elements so its not as laggy
Changelog-Fixed: Fixed glitchy preview
2023-04-30 20:06:38 -07:00
symbsrcool
6ac68b5a73 Add nokyctranslate translation option
Changelog-Added: Add nokyctranslate translation option
Closes: #946
2023-04-24 18:07:03 -07:00
8733cbd42c Fix localization issues and export strings for translation 2023-04-24 01:25:07 +02:00
William Casarin
f5cdd4a159 You can now change the default zap type
Changelog-Added: You can now change the default zap type
2023-04-23 10:31:51 -07:00
e934c2bb11 Fix crash with LibreTranslate server setting selection and remove delisted vern server
Broken after the settings refactor

Changelog-Fixed: Fix crash with LibreTranslate server setting selection and remove delisted vern server
Closes: #998
2023-04-22 12:33:11 -07:00
William Casarin
055b13c1cd Fix buggy zap amounts and wallet selector settings
Changelog-Fixed: Fix buggy zap amounts and wallet selector settings
2023-04-22 12:10:10 -07:00
William Casarin
ec75769a0f Refactor notification state filter saving and loading 2023-04-21 16:39:12 -07:00
William Casarin
aa559b2916 Refactor and Scope user settings to pubkey 2023-04-21 16:21:01 -07:00
William Casarin
040e452132 Fix having to set onlyzaps mode every time on restart
Changelog-Fixed: Fix having to set onlyzaps mode every time on restart
2023-04-21 10:01:32 -07:00
William Casarin
ac82f1bc09 Add OnlyZaps Mode
Changelog-Added: Add OnlyZaps mode: disable reactions, only zaps!
2023-04-20 13:41:05 -07:00
66641fc9ae Add setting to hide reactions
Changelog-Added: Add setting to hide reactions
2023-04-20 08:20:50 -07:00
bff3c0dd52 Improve sats numeric entry for zaps
Changelog-Changed: Add number formatting for sats entry and use selected zaps amount from picker as placeholder
Changelog-Fixed: Do not allow non-numeric characters for sats amount and fix numeric entry for other number systems for all locales
2023-04-17 15:20:14 -07:00
William Casarin
2b2d124495 Configurable notification dots
Changelog-Added: Make notification dots configurable
2023-04-11 13:58:04 -07:00
William Casarin
24c82293b3 Disable translations in DMs by default
There is an option to enable it now.

Changelog-Changed: Disable translations in DMs by default
2023-04-06 12:07:01 -07:00
William Casarin
f236ea52e1 Implement additional text truncation settings
Changelog-Added: Added text truncation settings
2023-04-05 10:32:32 -07:00
William Casarin
9c8391b33b Refactor settings into subsections 2023-04-05 10:23:07 -07:00
William Casarin
0436c68ec5 Fix some notification settings not saving
Changelog-Fixed: Fix some notification settings not saving
2023-04-05 08:43:52 -07:00
Swift
e2812a9aa1 Add option to only show notification from people you follow
Changelog-Added: Add option to only show notification from people you follow
Closes: #866
2023-04-04 10:22:41 -07:00
Swift
61ef709d91 Local notifications for other events
Changelog-Added: Added local notifications for other events
2023-04-03 16:38:39 -07:00
William Casarin
4996272942 Only truncate timeline text if enabled in settings
Changelog-Changed: Only truncate timeline text if enabled in settings
2023-04-03 11:30:05 -07:00
William Casarin
f2ce146e98 Revert "Refactor auto-translations and add caching"
There are quite a few issues with this and is causing crashing

This reverts commit ae82114a33.
2023-03-31 10:01:31 -07:00
ae82114a33 Refactor auto-translations and add caching
Changelog-Added: Add auto-translation caching to ruduce api usage
Closes: #843
2023-03-31 09:07:15 -07:00
Swift
5e0ff1a6a0 Video Uploads
Changelog-Added: Add support for video uploads
2023-03-27 11:30:58 -04:00
William Casarin
63e28d4d79 Enable auto-translate by default 2023-03-27 10:44:19 -04:00
866e93d338 Add auto-translate setting 2023-03-27 10:31:58 -04:00