notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 497c102af123e7f7c2230d42758a46dd99fdf2ff
parent 1100e2823300a2f92e2f85a427b58f53c834f949
Author: kernelkind <kernelkind@gmail.com>
Date:   Mon,  7 Jul 2025 17:50:37 -0400

expose `AccountSubs`

Signed-off-by: kernelkind <kernelkind@gmail.com>

Diffstat:
Mcrates/notedeck/src/account/accounts.rs | 12++++++++----
Mcrates/notedeck/src/lib.rs | 2+-
2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/crates/notedeck/src/account/accounts.rs b/crates/notedeck/src/account/accounts.rs @@ -312,6 +312,10 @@ impl Accounts { create_wakeup(ctx), ); } + + pub fn get_subs(&self) -> &AccountSubs { + &self.subs + } } enum AccType<'a> { @@ -421,14 +425,14 @@ pub struct AddAccountResponse { pub unk_id_action: SingleUnkIdAction, } -pub(super) struct AccountSubs { +pub struct AccountSubs { relay: UnifiedSubscription, mute: UnifiedSubscription, - contacts: UnifiedSubscription, + pub contacts: UnifiedSubscription, } impl AccountSubs { - pub fn new( + pub(super) fn new( ndb: &mut Ndb, pool: &mut RelayPool, relay_defaults: &RelayDefaults, @@ -448,7 +452,7 @@ impl AccountSubs { } } - pub fn swap_to( + pub(super) fn swap_to( &mut self, ndb: &mut Ndb, pool: &mut RelayPool, diff --git a/crates/notedeck/src/lib.rs b/crates/notedeck/src/lib.rs @@ -33,7 +33,7 @@ mod user_account; mod wallet; mod zaps; -pub use account::accounts::{AccountData, Accounts}; +pub use account::accounts::{AccountData, AccountSubs, Accounts}; pub use account::contacts::{ContactState, IsFollowing}; pub use account::relay::RelayAction; pub use account::FALLBACK_PUBKEY;