Commit Graph

455 Commits

Author SHA1 Message Date
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
b5ea1e011e Revert "profile: make profile loading more lightweight for now"
Changelog-Fixed: Load more content on profile view
2023-07-04 11:51:07 -07:00
640fbf23ea Fix UI bug with user search and fix race conditions on profiles NIP-05 cache
Signed-off-by: Terry Yiu <git@tyiu.xyz>
Reviewed-by: William Casarin <jb55@jb55.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2023-07-04 09:09:14 -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
prprhyt
94bd194287 Added event id validation 2023-07-03 15:03:33 -07:00
William Casarin
97f10e865f NostrScript
NostrScript is a WebAssembly implementation that interacts with Damus.
It enables dynamic scripting that can be used to power custom list views,
enabling pluggable algorithms.

The web has JavaScript, Damus has NostrScript. NostrScripts can be
written in any language that compiles to WASM.

This commit adds a WASM interpreter I've written as a mostly-single C
file for portability and embeddability. In the future we could
JIT-compile these for optimal performance if NostrScripts get large and
complicated. For now an interpreter is simple enough for algorithm list
view plugins.

Changelog-Added: Add initial NostrScript implementation
Signed-off-by: William Casarin <jb55@jb55.com>
2023-07-03 14:31:38 -07:00
0c0c58c0cc Fix bug with Trie search
Exact matches were not being returned first in the array of results

Signed-off-by: Terry Yiu <git@tyiu.xyz>
Reviewed-by: William Casarin <jb55@jb55.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2023-07-03 13:37:52 -07:00
William Casarin
7d49d3d9f1 refactor: make guard statement a bit more readible
It's a bit confusing to guard on a negative boolean expression
2023-07-03 12:48:25 -07:00
cb1e16b1a4 Fix reports to conform to NIP-56
Changelog-Fixed: Fix reports to conform to NIP-56
Signed-off-by: Terry Yiu <git@tyiu.xyz>
Tested-by: William Casarin <jb55@jb55.com>
2023-07-03 12:25:12 -07:00
6e964f71ff Add trie-based user search cache to replace non-performant linear scans
Changelog-Added: Speed up user search
Tested-by: William Casarin <jb55@jb55.com>
Fixes: #1219
Closes: #1342
2023-07-03 12:06:01 -07:00
57159f7df9 Fix build warnings
Signed-off-by: Terry Yiu <git@tyiu.xyz>
Reviewed-by: William Casarin <jb55@jb55.com>
2023-07-03 08:50:17 -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
5bac6405b9 validation: make sure to run on a detached task
so we don't do sig validation on the main thread accidentally
2023-06-30 06:42:56 -07:00
Bryan Montz
087d3e16a1 After loading the user's relays from their contact event, connect to new relays
Closes: #1298
2023-06-28 15:16:36 +02:00
William Casarin
1a0282fe21 Revert "nozaps: don't pull thread zaps in nozaps mode"
This reverts commit 6003a3c6f8.
2023-06-27 05:59:59 +02:00
William Casarin
959f208e36 profile: make profile loading more lightweight for now 2023-06-27 05:31:22 +02:00
cfe14fac23 Deduplicate users in group notifications
Changelog-Fixed: Deduplicate users in notifications
Closes: #1326
2023-06-26 11:31:36 +02:00
2046fe5502 Fix notification content rendering of repost and reaction events
Closes: #1318
Changelog-Fixed: Fix notification content rendering of repost and reaction events
2023-06-26 11:20:11 +02:00
William Casarin
6003a3c6f8 nozaps: don't pull thread zaps in nozaps mode 2023-06-26 11:20:11 +02:00
422167f7aa Add indication of followers you know in a profile
Changelog-Added: Add indication of followers you know in a profile
2023-06-25 09:38:57 +02:00
William Casarin
f090596067 nozaps: switch to global sheet when zapping
This fixes many popping bugs

Changelog-Fixed: Fix zap sheet popping
2023-06-23 20:46:27 +02:00
William Casarin
8b24befaf7 nozaps: don't include zaps in thread replies 2023-06-23 20:46:27 +02: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
ed73899e5b Revert "Initial actionbar model refactor"
This reverts commit d0eb86dfa3.
2023-06-23 12:04:54 +02:00
William Casarin
d0eb86dfa3 Initial actionbar model refactor 2023-06-23 11:53:53 +02:00
William Casarin
337c4de337 reduce ContentView redraws
Remove observability from the home model, and use inner models for
updating specific parts of the UI, such as notification dots on the tab
bar.
2023-06-23 11:51:51 +02:00
William Casarin
e885f38c54 refactor: switch CustomizeZapView to use a model
Changelog-Fixed: Fix CustomizeZapView from randomly disappearing
2023-06-23 11:51:51 +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
William Casarin
c218e0dcdd refactor: use zap.is_anon instead of recomputing
I believe this code was written before we computed is_anon inside the
zap.
2023-06-22 10:23:56 +02:00
William Casarin
e4842cca3c logs: don't print filters
It can be slow
2023-06-20 17:00:48 +02:00
William Casarin
1c655d47b2 home: add comment explaining send_home_filters 2023-06-10 15:09:43 +02:00
William Casarin
24cc361d60 refactor: make send_initial_filter more readible 2023-06-10 15:09:43 +02:00
William Casarin
ba3a6b07b2 Fix warnings 2023-06-10 11:33:07 +02:00
William Casarin
043eb5b436 Show zap comments in threads and show top zap
Changelog-Added: Top zaps
Changelog-Added: Show zap comments in threads
2023-06-09 10:11:25 +02:00
William Casarin
a0caf9ce07 find_event: refactor with more explicit types 2023-06-07 08:06:06 +02:00
14977fe3dd Replace indexed mentions with NIP-27
Changelog-Fixed: Replace indexed mentions with NIP-27
Closes: #1213
2023-06-07 06:22:38 +02:00
8ca377bec9 Add max length truncation to displayed profile attributes to mitigate spam
Changelog-Fixed: Add max length truncation to displayed profile attributes to mitigate spam
Fixes: #1237
2023-06-04 17:50:52 -04:00
952d6746d5 Add profile zaps
Refactor profile zaps to reuse same BOLT11 Lightning invoice logic as
note zaps, which fixes profile zaps from Cash App and Muun wallets

Changelog-Added: Add profile zaps
Changelog-Fixed: Fix profile zapping for Muun and Strike wallets
Closes: #1236
Fixes: #1067
2023-06-04 10:56:43 -07: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
Bryan Montz
fe4277e817 simplified call site usage of NostrFilter 2023-05-29 12:19:27 -07:00
Bryan Montz
ea73c5252d Merge branch 'master' into user-cache 2023-05-26 06:46:47 -05:00
1769b08147 Fix reaction notification title to be consistent with ReactionView
Changelog-Fixed: Fix reaction notification title to be consistent with ReactionView
Closes: #1137
2023-05-24 15:20:02 -07:00
William Casarin
47a74257c8 nwc debugging 2023-05-24 15:16:45 -07:00
William Casarin
bffa42a13a Supporter Badges 2023-05-15 11:57:37 -07:00
William Casarin
a6745af519 Implement damus zap split donations using NWC 2023-05-15 09:41:26 -07:00
Bryan Montz
91113fbc6d allow models to fetch profiles when they get stale 2023-05-15 08:33:35 -05:00
Bryan Montz
bc315dd571 remove identical function 2023-05-15 07:33:49 -05:00
William Casarin
631220fdcb ui: add support damus ui in WalletView
This appears after you've connected your wallet
2023-05-14 22:24:12 -07:00