From 497c102af123e7f7c2230d42758a46dd99fdf2ff Mon Sep 17 00:00:00 2001 From: kernelkind Date: Mon, 7 Jul 2025 17:50:37 -0400 Subject: [PATCH] expose `AccountSubs` Signed-off-by: kernelkind --- crates/notedeck/src/account/accounts.rs | 12 ++++++++---- crates/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 index 9deb36ce..4c3c53c3 100644 --- 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 index afcab40a..43d03e4e 100644 --- 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;