William Casarin
4526434405
update to latest nostrdb, adding tag support
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-07 14:53:50 -07:00
William Casarin
6222a7db63
Fix all warnings
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-01 10:19:47 -07:00
William Casarin
625eb3ea16
fix global query
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-03-26 09:20:10 +00:00
William Casarin
89f7f838a7
load timelines from commandline
...
great way to test queries statelessly
2024-03-22 11:15:09 +01:00
William Casarin
35a9fa3dd8
queries: add a few more test queries
2024-03-22 11:12:32 +01:00
William Casarin
2936012308
filters: fix hashtag filters
...
We might need to move to something a bit more generic that works
for all generic tag filters.
2024-03-22 10:23:41 +01:00
William Casarin
450709afa7
test: use my timeline query by default for testing
2024-03-21 18:23:33 +01:00
William Casarin
d7a41115be
test: add test timeline query
...
notedeck "$(cat queries/timeline.json)"
Closes: https://github.com/damus-io/notedeck/issues/5
2024-03-21 16:24:18 +01:00
William Casarin
f364748005
ui: reduce vertical padding for more compact timelines
2024-03-21 15:54:08 +01:00
William Casarin
81162a3d6e
nostrdb: bump to support timeline queries
...
This version of nostrdb supports timeline queries, so we can use
contact lists to query the timeline.
2024-03-21 14:31:38 +01:00
William Casarin
9ebbaf40e5
style: initial logic for mobile style
...
we definitely watch pure black for oled mobile screens, better battery
life.
Signed-off-by: William Casarin <jb55@jb55.com >
2024-03-21 14:31:00 +01:00
William Casarin
57308f108e
gitignore: add perf files
2024-03-21 14:30:22 +01:00
William Casarin
ea952c4c58
actionbar: support both dark and light buttons
...
since there is no way to do icon masks, we simply use two different
textures for dark and light mode reply buttons.
I used this command to create the dark mode button:
convert reply.png -channel RGB -negate reply-dark.png
Signed-off-by: William Casarin <jb55@jb55.com >
2024-03-21 14:28:49 +01:00
William Casarin
f88b6d1dd4
Merge remote-tracking branch 'github/master'
2024-03-13 16:48:27 +00:00
William Casarin
c0979d1707
widgets: begin organizing ui components into widgets
...
egui widgets are nice because there are many helper methods on the
egui::Ui struct for adding widgets to the screen in various ways. For
example, add_sized which designates an area to paint a widget. This is
useful in the note_contents case, as it allows us to reserve
available_space-20.0 pixels of the available area, saving 20.0 pixels
for a side-actionbar popout.
I'm not sure I'll use the side actionbar yet, but I've been
experimenting with that as an option to save vertical space in the
timeline.
I still need to make the side actionbar into a widget as well. It
currently uses the CollapsingHeader widget, which is designed for
expanding elements vertically. We may need to make our own widget for
animating an horizontal expansion if we want to achieve a similar effect
for the side actionbar.
2024-03-13 13:38:02 +00:00
William Casarin
247feb9e26
filter: unify nostrdb and remote limits
...
Before we were setting filter limits in two different places. Let's
unify them so we don't have to sources of truth for filter limits.
2024-03-13 13:24:06 +00:00
William Casarin
50aa21b2f0
app: make ndb public
...
We will be using this in some submodules, so expose it for now
2024-03-13 13:23:13 +00:00
William Casarin
08fad55773
weird actionbar experiment
2024-03-12 10:11:27 +00:00
William Casarin
d4879aefe9
actionbar placeholder
2024-03-09 01:39:16 -08:00
William Casarin
4a5a9d4319
black background
2024-03-09 01:21:07 -08:00
William Casarin
088d012c93
fix typo
2024-02-27 15:02:52 -08:00
William Casarin
87f385b683
profile picture image cache
...
coding from a plane so this is helping alot with PFPs
2024-02-27 14:26:02 -08:00
William Casarin
1c16ddf9af
deps: update poll-promise, add hex
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-27 14:25:46 -08:00
William Casarin
4a802ac0f4
direnv: disable nix direnv on darwin
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-26 14:09:37 -08:00
William Casarin
40fd85da58
relay: don't query unknown authors if we have none to query
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-16 11:39:22 -08:00
William Casarin
3870bc9506
pfp: small fix in profile pic loading
...
I want to tweak the size of the profile pic, this is a small change
that I noticed toward that goal.
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-16 11:39:22 -08:00
William Casarin
4ea82cd332
debug: fix annoying decode error message
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-16 11:39:22 -08:00
William Casarin
300dfc8a4e
fonts: remove old font loading code
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-16 11:39:22 -08:00
William Casarin
97aaa651d8
style: allow font style customization in the future
...
I had a work in progress commit that changed font styles that needed
this change, so doing it here for now.
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-16 11:39:22 -08:00
William Casarin
b0d0e45133
fonts: implement roberto's typography for notedeck
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-15 16:18:24 -08:00
William Casarin
5ecc43786f
ui: remove extra padding on main panel
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-15 14:53:09 -08:00
William Casarin
ef1e7e3ac8
perf: fix profiler
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-15 14:05:37 -08:00
William Casarin
f3201bee21
ui: add reltime rendering
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-15 13:56:07 -08:00
William Casarin
2ce2d4cc70
notecache: add initial in-memory notecache
...
This is useful for things like relative time strings and other
transient note cache state
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-15 13:07:01 -08:00
William Casarin
c246b9d92f
time: add time_ago function from Damus iOS
...
Useful relative time formatting
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-15 13:07:01 -08:00
William Casarin
2f54a05705
timecache: add timecache help for timed caches
...
Some things we definitely don't want to generate every frame, such as
relative-time formatted strings, as that would create a heap allocation
each frame.
Introduce TimeCached<T> which is responsible for updating some state
after some expiry.
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-15 13:07:01 -08:00
William Casarin
9a4f193e03
deps: bump nostrdb to include notekey hash
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-15 13:07:01 -08:00
William Casarin
5521779f42
android: fix args
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-15 13:07:01 -08:00
William Casarin
1dab4757df
perf: always show profiling info for now
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-15 13:07:01 -08:00
William Casarin
9d1127a26e
envrc: add my pubkey for testing
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-15 13:07:01 -08:00
William Casarin
2a79bdbbab
query: reduce initial filter size for now
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-15 13:07:01 -08:00
William Casarin
761012dd04
nix: add some debug and heap tracking utils
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-15 13:07:01 -08:00
William Casarin
0f2a5c3055
enable japanese, chinese, korean fonts
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-12 01:07:39 -08:00
William Casarin
0945b21710
disable inline image renderer for now
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-12 01:07:22 -08:00
William Casarin
7dcfde7109
enable passing queries via argument
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-12 01:06:59 -08:00
William Casarin
20a68a19f2
images: add copy link to image context menu
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-11 14:40:14 -08:00
William Casarin
3a68cb9a99
bump nostrdb
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-11 14:08:58 -08:00
William Casarin
72a53c0192
media: render images on posts
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-11 13:58:38 -08:00
William Casarin
4ae3a701b8
deps: install ehttp loader
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-11 13:58:15 -08:00
William Casarin
30b55abd72
links: set hyperlink color to purple
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-11 13:03:11 -08:00
William Casarin
63e195852b
note: make links clickable
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-11 13:00:07 -08:00
William Casarin
c05d0713b7
cargo: rename to notedeck
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-11 12:49:11 -08:00
William Casarin
c1d6788a9f
macos: render into the titlebar
...
also remove fps indicator unless in profiling mode
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-11 12:35:20 -08:00
William Casarin
31d770cbf4
add a few more relays for testing
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-11 11:57:25 -08:00
William Casarin
908f1e4dfd
profiles: find missing profiles from mentions
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-10 20:24:54 -08:00
William Casarin
3b1550d78c
bump nostrdb
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-10 20:24:37 -08:00
William Casarin
8f3ec342c4
note: render mentions
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-10 18:46:52 -08:00
William Casarin
377b1eb935
note: add render_note_contents stub
...
We will be using this for our note contents renderer
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-10 17:13:31 -08:00
William Casarin
5317341080
name: don't render display_name first if its empty
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-10 17:13:13 -08:00
William Casarin
3e96f815b1
apply cargo warning suggested fixes
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-10 16:19:31 -08:00
William Casarin
83571aaf88
note: show non-displayname if we have it
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-10 16:14:52 -08:00
William Casarin
9feb6465c0
enostr: remove nostr crate for now
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-10 16:14:45 -08:00
William Casarin
a51935b292
add wgpu again since I remove it by accident
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-10 15:18:53 -08:00
William Casarin
b3d8ef373a
profiles: fetch missing profiles when receiving notes
2024-02-10 15:11:10 -08:00
William Casarin
adc74dd7c9
home: move subscriptions to timeline
2024-02-10 14:56:44 -08:00
William Casarin
d7607c8297
updates deps
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-10 13:58:32 -08:00
William Casarin
3925012ad9
android: pass in internal data path for db
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-10 13:57:46 -08:00
William Casarin
c3779510ec
Revert "android: attempt to get it working on really old versions"
...
This reverts commit e2b3004cb4 .
2024-02-09 18:55:25 -08:00
William Casarin
fd0a14eac2
initial fixes for android build
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-09 18:55:12 -08:00
William Casarin
a9df41d7ba
update cargo deps
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-09 18:55:02 -08:00
William Casarin
4eaf17897e
restore top panel behavior
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-09 18:22:24 -08:00
William Casarin
f323fe7379
LOCAL RELAY MODEL IS WORKING
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-09 16:59:49 -08:00
William Casarin
4a9af5561a
bump cargo
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-09 16:59:41 -08:00
William Casarin
1262c4e1f7
gitignore: ignore db files
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-07 15:47:00 -08:00
William Casarin
f786d0568d
subs: switch to multiple-filter style
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-07 15:46:06 -08:00
William Casarin
74ce87049d
local nostrdb subscriptions working
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-07 15:18:23 -08:00
William Casarin
499f10ce39
update deps
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-07 15:18:10 -08:00
William Casarin
7d75570c12
make: fix tags
2024-02-07 12:13:05 -08:00
William Casarin
243f6cecd7
add enostr->nostrdb filter conversions
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-07 12:06:59 -08:00
William Casarin
95c836b375
update to latest egui
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-07 12:06:28 -08:00
William Casarin
d38fcf80b9
update cargo
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-07 12:06:13 -08:00
William Casarin
9a9bb13e08
enostr: use data instead of strings in Pubkey and EventId
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-07 12:02:13 -08:00
William Casarin
6c2c352e6f
enostr: update deps
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-02-07 12:01:58 -08:00
William Casarin
da3ee989fe
fonts: use gossip's font loading code for testing
2024-01-04 07:59:44 -08:00
William Casarin
16323abe93
assets: add some fonts
...
some taken from gossip for testing
2024-01-04 07:59:28 -08:00
William Casarin
596a8030d1
rename main -> notedeck
2024-01-04 07:24:35 -08:00
William Casarin
f425f72fd1
build: add small profile
2024-01-04 07:24:35 -08:00
William Casarin
548325c478
only add kind1 to timeline
2023-12-24 18:14:06 -08:00
William Casarin
5b67a53b61
render only 50 events for now until we have infinite scroll
2023-12-24 18:14:06 -08:00
William Casarin
f46797ea10
net: geometric backoff connection retries on disconnects
2023-12-24 14:24:22 -08:00
William Casarin
6dee4bbe7d
timeline: add new notes at the start
...
still need proper insert logic based on created date
2023-12-24 14:24:22 -08:00
William Casarin
b8357d840b
log: remove "woke up" log. it's annoying
2023-12-24 14:24:22 -08:00
William Casarin
20bc99e511
Revert "Update README.md"
...
This is an outdated page
This reverts commit ad8acf47c5 .
2023-12-24 12:40:15 -08:00
William Casarin
17ec0c0a99
pool: process all events as soon as possible
...
before we were only processing one event per frame. This ensured that
not too much time is spent processing events in a single frame.
Unfortunately since we don't have persistent frame rendering, this is
not reliable.
We can look into limiting the number of events processed per frame if
message processing gets heavy.
2023-12-24 12:34:17 -08:00
William Casarin
09cd8ff379
pool: implement keepalive pinging
...
To prevent us from disconnecting, introduce keepalive pinging. In the
event loop we check if any relays need a refresh ping.
2023-12-24 12:34:17 -08:00
William Casarin
dd7093288b
relay: add ping method
...
we will use this to ping relays
2023-12-24 12:34:17 -08:00
William Casarin
db68ae6280
log: chop some noisy logs
2023-12-24 12:34:17 -08:00
William Casarin
ab2633e038
ui: brighter timeline text
...
We still need to make the username bolder
2023-12-24 12:34:17 -08:00
William Casarin
de5d7c4088
viewport scroll rendering experiments
2023-12-24 12:34:17 -08:00
William Casarin
e2b3004cb4
android: attempt to get it working on really old versions
2023-12-24 12:34:17 -08:00