Commit Graph

525 Commits

Author SHA1 Message Date
William Casarin
38fc39e275 clippy: fix clippy issues
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-27 14:34:00 -08:00
William Casarin
de802cd363 Revert "ui: simply hide post button if buffer is empty"
This reverts commit 4133570c2e.
2024-11-27 09:30:07 -08:00
William Casarin
e69a7f83ae refactor: make LoginAction a bit safer
We make LoginAction a simple wrapper around processing the unknown
action to expose too much internal logic. This allows us to have a
must_use on our LoginAction type, otherwise the SingleUnkIdAction's
must_use will be lost when returned in the login action.

Fixes: a5cdddbb2b ("user can upgrade their npub -> nsec")
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-27 09:28:29 -08:00
kernelkind
a5cdddbb2b user can upgrade their npub -> nsec
closes https://github.com/damus-io/notedeck/issues/476

Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-11-26 21:22:52 -05:00
William Casarin
18eba128f6 set app icon to damus logo
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-26 13:25:30 -08:00
William Casarin
cea144b5b7 NoteDeck -> Notedeck
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-26 10:48:25 -08:00
William Casarin
4a9267fed1 Merge disable compose button if selected not nsec #470
kernelkind (2):
      don't try to use other accounts to post
      disable compose button if selected not nsec
2024-11-26 10:12:32 -08:00
William Casarin
a147aa0961 fix fmt
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-22 13:31:43 -08:00
William Casarin
9cfae313aa Merge include commit hash in SupportView #471
kernelkind (1):
      include commit hash in SupportView
2024-11-22 13:03:34 -08:00
William Casarin
c9d1b48706 Merge disable post button if draft buffer empty #469
William Casarin (2):
      ui: simply hide post button if buffer is empty

kernelkind (1):
      disable post button if draft buffer empty
2024-11-22 13:01:03 -08:00
William Casarin
4133570c2e ui: simply hide post button if buffer is empty
Fixes: 8464a1d22c ("disable post button if draft buffer empty")
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-22 12:59:38 -08:00
William Casarin
e2a2db8ac2 refactor: move save_cols closer
why you so far away little guy?

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-22 11:28:33 -08:00
kernelkind
792abf11d7 add new column type: hashtag
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-11-21 20:18:39 -05:00
kernelkind
308717cabf include commit hash in SupportView
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-11-21 16:13:36 -05:00
kernelkind
d090766db9 disable compose button if selected not nsec
closes: https://github.com/damus-io/notedeck/issues/353

Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-11-21 15:45:13 -05:00
kernelkind
d15aa65bd7 don't try to use other accounts to post
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-11-21 15:34:27 -05:00
kernelkind
8464a1d22c disable post button if draft buffer empty
closes: https://github.com/damus-io/notedeck/issues/417

Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-11-21 15:27:19 -05:00
William Casarin
679a5afdeb nav: only save columns once
Before we would save columns for each rendered nav. Now we only do it
once.
2024-11-19 18:52:42 -08:00
William Casarin
7f234935cc refactor: unify note, post and nav actions
There was a bunch of redundant responses. Let's unify them under
the RenderNavAction enum. We unify all action processing under this
type.

This also centralizes all of our side effects into a single function
instead of scattering them everywhere
2024-11-19 18:43:09 -08:00
William Casarin
d97c957e67 Merge remote-tracking branch 'pr/455' into login-first-open 2024-11-18 18:27:46 -08:00
William Casarin
63d0a622f1 onboarding: show account login route on first open
Instead of only new columns, show login route on first open.

We will also add a demo column.

Changelog-Changed: Show login column on first open
Fixes: https://github.com/damus-io/notedeck/issues/440
2024-11-18 18:22:08 -08:00
William Casarin
22e67c95cc refactor: rename AccountsManager to Accounts
plz stop with the managers
2024-11-18 18:03:57 -08:00
William Casarin
6545e1ddee thread: ensure thread unknowns are handled 2024-11-18 17:28:55 -08:00
William Casarin
19933c84f1 onboarding: lookup profile after accounts are added
To reduce the side effects of this change, we introduce a new UnknownId
action type:

  - SingleUnkIdAction

This can be returned from functions to signal that we need to do some
work to look for things. We add a `must_use` directive to this type
to ensure callers handle it.

Changelog-Fixed: Fix missing profiles when new accounts are added
Fixes: https://github.com/damus-io/notedeck/issues/356
2024-11-18 17:11:58 -08:00
William Casarin
3b3b8246c8 startup: remove panic hook
doesn't seem to be working anyways
2024-11-18 17:10:25 -08:00
alltheseas
252aa11359 Update account_login_view.rs
added example nip05/nostr address in "enter your public key..." field
2024-11-18 08:58:34 -06:00
William Casarin
de8029d60f fix crash when removing non-last columns
Fixes: https://github.com/damus-io/notedeck/issues/445
2024-11-17 17:12:59 -08:00
William Casarin
a678e647a4 hide media on universe view
Also fixes textmode

Fixes: https://github.com/damus-io/notedeck/issues/443
2024-11-17 16:45:28 -08:00
William Casarin
33b2fa263e fix issue where columns fail to load on first failure
This fixes an issue where if one of the columns fail to load, all other
columns fail to load. This is because we are too aggressive with the
early exit on failure.

To reproduce:

$ notedeck --dbpath what

With existing columns in an existing data path.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-15 12:30:45 -08:00
William Casarin
8043d86bf2 arg: fix broken dbpath argument, add test
I broke dbpath, lets fix that and add a test so it doesn't happen again

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-15 12:30:45 -08:00
William Casarin
ebfa9e4450 fix log message for relay states
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-15 10:11:04 -08:00
William Casarin
4d124c05fa remove unnecessary crash
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-15 10:11:00 -08:00
William Casarin
01bedac710 Fix filter states when adding columns
This fixes various issues with filter states when adding columns. We now
maintain multiple states per relay so that we don't lose track of
anything.

Fixes: https://github.com/damus-io/notedeck/issues/431
Fixes: https://github.com/damus-io/notedeck/issues/359
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-14 15:25:08 -08:00
William Casarin
845f745dca remove NewTimelineSub
New timelines should be handled in the standard timeline codepaths

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-14 10:36:16 -08:00
William Casarin
3fb78ae01e nav: use id_source instead of show argument
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 16:14:56 -08:00
William Casarin
4c458727a9 fix: save columns on removal
Fixes: https://github.com/damus-io/notedeck/issues/432
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 15:51:46 -08:00
William Casarin
91016facc7 Merge Persist Columns #390
Fixed a few merge conflicts

kernelkind (2):
      initial column storage
      tmp remove DeckAuthor columns
2024-11-13 13:13:55 -08:00
William Casarin
94b97d247d Merge Add External Notifications Column setting #395
kernelkind (2):
      init external notifs column
      use AcquireKeyState for AddColumn
2024-11-13 13:06:18 -08:00
William Casarin
29da910534 android: fix build
Fixes: 2f20e8253e ("app: simplify Damus::new constructor")
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 12:10:02 -08:00
William Casarin
804a7f0bf9 test: add args column test
Adding a testcase for a bug I noticed on another branch

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 10:55:14 -08:00
William Casarin
19d790fce0 timeline: add TimelineKind equality
we will be using these for tests

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 10:55:14 -08:00
William Casarin
9801a20429 storage: simplify imports
Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 10:55:14 -08:00
William Casarin
d1059d9480 bin: extract logging setup into its own function
a little bit less messy

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 10:55:14 -08:00
William Casarin
2f20e8253e app: simplify Damus::new constructor
Just take an egui::Context instead of an eframe::CreationContext.
This should make it easier to test the app via egui::Context::default();

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 10:53:29 -08:00
William Casarin
fab1257f6e paths: remove hardcoded basepath
Before we were hardcoding the basepath with dirs, which isn't that
useful for testing, previews, or for android. Let's fix that.

This also moves the db and cache directories into our root DataPaths.
This is a breaking change, we don't have a migration step. sorry.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-11-13 09:55:56 -08:00
Ken Sedgwick
877a30d2f6 Enable file_key_storage on Android 2024-11-11 10:14:42 -08:00
kernelkind
412ba9b565 use AcquireKeyState for AddColumn
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-11-02 22:18:27 -04:00
kernelkind
529b76094c init external notifs column
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-11-02 22:18:23 -04:00
kernelkind
ee5dd5426f tmp remove DeckAuthor columns
we don't yet have logic for handling switching 'deck authors' and this
is causing two problems:
1. the column title isn't renamed when the selected account is changed
2. when saving a deck author column to disk and the account is switched
   beforehand, it switches to the current deck author's column

Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-30 13:46:00 -04:00
kernelkind
56dd88b3a2 initial column storage
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-30 13:40:31 -04:00