William Casarin
31b2b5c950
initial refactor in preparation for routing
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-28 15:09:01 -07:00
William Casarin
2af44641db
cap size of remote filter limits
...
I noticed the responses are a bit slow without this. Local query limits
are not capped.
Fixes: https://github.com/damus-io/notedeck/issues/98
Changelog-Changed: Restrict remote filter sizes to 250 (for now)
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-27 11:50:45 -07:00
kernelkind
df0377cb89
Pfp integration to side panel
...
Signed-off-by: kernelkind <kernelkind@gmail.com >
2024-05-27 10:48:28 -07:00
kernelkind
2ca47edf4d
AccountManager: add ability to make a selection
...
Signed-off-by: kernelkind <kernelkind@gmail.com >
2024-05-27 10:48:28 -07:00
kernelkind
11b3effa51
Add AccountManager to app
...
Signed-off-by: kernelkind <kernelkind@gmail.com >
2024-05-27 10:48:28 -07:00
kernelkind
748d9d2358
Integrate global popup into app
...
Signed-off-by: kernelkind <kernelkind@gmail.com >
2024-05-27 10:48:28 -07:00
William Casarin
194f41d39c
integrate sidebar into main view
...
buttons don't do anything yet
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-27 10:48:28 -07:00
kernelkind
1dc832baea
app: add accounts to Damus & mock
...
Signed-off-by: kernelkind <kernelkind@gmail.com >
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-27 10:48:28 -07:00
William Casarin
9e5048d4f2
input: fix deadlock on resize
...
weird egui Context quirk
Fixes: https://github.com/damus-io/notedeck/issues/97
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-24 13:42:57 -07:00
William Casarin
2bef02106a
mobile: use my timeline for testing again
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-24 13:21:37 -07:00
William Casarin
c5cc2f923c
mobile: a tad more padding at the top
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-24 13:21:22 -07:00
William Casarin
739e9f87f2
nip10: fetch unknown replied-to notes
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-24 13:20:33 -07:00
William Casarin
6fc5eb27fc
working notes + notes&replies
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-23 15:31:24 -07:00
William Casarin
232ba0e3aa
list: switch from arc mutext to rc refcell
...
we don't have any multithreaded stuff yet
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-23 15:27:37 -07:00
William Casarin
a8693a2bd3
timeline: refactor tabs into TimelineView
...
TimelineView is a filtered view of a timeline. We will use this for
future tab rendering. We also introduce a new "selection" concept for
selecting notes on different timeline views. This is in preparation for
vim keybindings.
2024-05-23 15:27:37 -07:00
William Casarin
8663851e7e
input: handle raw events
2024-05-23 15:27:37 -07:00
William Casarin
cf2a832a5e
input: switch to scanning over raw input events
...
Calling key_pressed invokes a filter over the entire event list every
time, this is much more efficient, which is important when we are
handling many key events.
2024-05-23 11:16:50 -07:00
William Casarin
3a891a982c
input: process input once
...
Instead of calling ctx.input multiple times, let's do it once. We are
going to do a lot more stuff in here, such as vim key bindings
2024-05-23 11:16:50 -07:00
William Casarin
93b7af1a4e
perf: fix continuous repaint
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-23 11:16:50 -07:00
William Casarin
c30fc44df0
cleanup: remove old viewport code
2024-05-23 11:16:50 -07:00
William Casarin
4fc6e225ca
don't bump timeline when adding notes
...
This is quite different than Damus iOS. The timeline will continually
add new items without bumping scroll position, thanks to
egui-virtual-list's `items_inserted_at_start` function.
Closes: https://github.com/damus-io/notedeck/issues/38
Fixes: https://github.com/damus-io/notedeck/issues/59
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-16 10:26:36 -07:00
William Casarin
0e0e5d0eaa
fix clippy issues
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-15 20:53:17 -07:00
William Casarin
95c526f453
mobile: add lots of top padding on mobile
...
and remove top panel
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-15 18:01:28 -07:00
William Casarin
dbc56ac098
mobile: simplify is_mobile
...
we don't need context anymore
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-15 18:01:04 -07:00
William Casarin
9e8f7a2e5c
ui: integrate egui-tabs for notes & replies selector
...
demo: https://cdn.jb55.com/s/notedeck-tabs.mp4
Fixes: https://github.com/damus-io/notedeck/issues/47
Signed-off-by: William Casarin <jb55@jb55.com >
2024-05-15 17:28:01 -07:00
William Casarin
d9f1582ee7
since filter optimization
...
This is an optimization that allows us to modify our network filter to
include since-information based off of our local relay. The idea is to
look at the latest note in a given view, and add that to the since
filter for the remote query.
Fixes: https://github.com/damus-io/notedeck/issues/36
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-29 14:06:20 -07:00
William Casarin
28e2e7edd5
Merge remote-tracking branch 'github/virtual-list'
2024-04-28 17:55:29 -07:00
William Casarin
26128c3456
use egui_virtual_list for rendering
...
absolutely insane performance increase
Fixes: https://github.com/damus-io/notedeck/issues/32
Suggested-by: @lucasmerlin
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-28 11:03:47 -07:00
William Casarin
69054d71ca
nip10: show initial reply information on notes
...
Using the newly merged nip10 code, we can show replies on notes!
This is not final, and it's actually different than how we do it in
Damus iOS. Not sure if I like it yet. We will likely have to put pubkey
information back in somewhere soon.
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-27 01:58:35 -07:00
William Casarin
1d44b08f13
ui: make pixel sizes correct, use more of the figma
...
I noticed the pixel sizes were off which made it harder to match the
pixel dimensions of rob's figma designs. This restores the pixel size
and adjust the font sizes so that things look somewhat ok with the
default pixel settings.
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-21 17:45:09 -07:00
William Casarin
51c25b88cc
timeline: use strips instead of panels
...
panels grow when their childs a larger than its container. strips do not
do this, which is better for timelines
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-19 19:55:02 -07:00
William Casarin
99ac578ebd
fix clippy warnings
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-19 14:30:08 -07:00
William Casarin
a71e8206fb
introduce View and Previews traits
...
In this commit we refactor the preview mechanism, and switch to
responsive views by default.
To create a preview, your view now has to implement the Preview trait.
This is very similar to SwiftUI's preview mechanism.
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-19 14:13:11 -07:00
William Casarin
6f2aa56b9e
ids: find more unknown ids from inline notes
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-14 16:30:12 -07:00
William Casarin
3b9cd3f3c4
mobile: black panel bg color
...
for battery life
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-12 21:14:56 -07:00
kernelkind
f0d56da4f5
Use custom style in app
...
Signed-off-by: kernelkind <kernelkind@gmail.com >
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-12 19:53:23 -07:00
William Casarin
d4ccf7435f
get all missing ids from all timelines
...
before we were only fetching missing profiles from the first timeline,
update the logic to pull both missing authors and ids from all timelines
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-12 18:52:32 -07:00
William Casarin
5e45e4a2e5
ui: simplify note widget
...
pass just a note pointer to the note ui widget. We currently don't
support non-db notes but we can add support for that later.
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-12 16:49:18 -07:00
William Casarin
4e7d168d22
refactor: rename widgets to ui
...
consolidate ui related things like widgets into our ui module
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-12 16:16:19 -07:00
William Casarin
9b7c63c800
refactor: move note into its own widget
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-12 16:03:16 -07:00
William Casarin
99b163da7e
textmode: fix coloring of abbreviated names
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-12 15:09:07 -07:00
William Casarin
bfdd066654
fix warnings
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-11 15:00:58 -07:00
William Casarin
116ba27f3f
ircmode: tighten username
...
will probably have to change the design of this for mobile
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-11 13:36:29 -07:00
William Casarin
9d1e8ce666
irc mode
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-11 11:09:30 -07:00
William Casarin
7ecacc69a5
log: reduce spammy new note log
...
Signed-off-by: William Casarin <jb55@jb55.com >
2024-04-09 18:49:52 -07:00
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
kernelkind
80b76c5381
Use app_creation for common app setup functions
...
Signed-off-by: kernelkind <kernelkind@gmail.com >
2024-04-01 10:15:45 -07:00
William Casarin
89f7f838a7
load timelines from commandline
...
great way to test queries statelessly
2024-03-22 11:15:09 +01:00
William Casarin
450709afa7
test: use my timeline query by default for testing
2024-03-21 18:23:33 +01:00