commit 41e141d9a9be1faa125a8894f40e2bc0b44eaffa
parent e8d833bf891d60fc43d4a3805551ef9aebe42d88
Author: kernelkind <kernelkind@gmail.com>
Date: Wed, 25 Jun 2025 16:25:43 -0400
move aux code to bottom
Signed-off-by: kernelkind <kernelkind@gmail.com>
Diffstat:
1 file changed, 38 insertions(+), 38 deletions(-)
diff --git a/crates/notedeck/src/account/accounts.rs b/crates/notedeck/src/account/accounts.rs
@@ -11,44 +11,6 @@ use std::collections::{BTreeMap, BTreeSet};
// TODO: remove this
use std::sync::Arc;
-#[derive(Debug, Clone)]
-pub struct SwitchAccountAction {
- /// Some index representing the source of the action
- pub source: Option<usize>,
-
- /// The account index to switch to
- pub switch_to: usize,
-}
-
-impl SwitchAccountAction {
- pub fn new(source: Option<usize>, switch_to: usize) -> Self {
- SwitchAccountAction { source, switch_to }
- }
-}
-
-#[derive(Debug)]
-pub enum AccountsAction {
- Switch(SwitchAccountAction),
- Remove(usize),
-}
-
-#[derive(Default)]
-pub struct ContainsAccount {
- pub has_nsec: bool,
- pub index: usize,
-}
-
-#[must_use = "You must call process_login_action on this to handle unknown ids"]
-pub struct AddAccountAction {
- pub accounts_action: Option<AccountsAction>,
- pub unk_id_action: SingleUnkIdAction,
-}
-
-pub struct AccountData {
- pub(crate) relay: AccountRelayData,
- pub(crate) muted: AccountMutedData,
-}
-
/// The interface for managing the user's accounts.
/// Represents all user-facing operations related to account management.
pub struct Accounts {
@@ -675,3 +637,41 @@ impl AddAccountAction {
self.unk_id_action.process_action(ids, ndb, txn);
}
}
+
+#[derive(Debug, Clone)]
+pub struct SwitchAccountAction {
+ /// Some index representing the source of the action
+ pub source: Option<usize>,
+
+ /// The account index to switch to
+ pub switch_to: usize,
+}
+
+impl SwitchAccountAction {
+ pub fn new(source: Option<usize>, switch_to: usize) -> Self {
+ SwitchAccountAction { source, switch_to }
+ }
+}
+
+#[derive(Debug)]
+pub enum AccountsAction {
+ Switch(SwitchAccountAction),
+ Remove(usize),
+}
+
+#[derive(Default)]
+pub struct ContainsAccount {
+ pub has_nsec: bool,
+ pub index: usize,
+}
+
+#[must_use = "You must call process_login_action on this to handle unknown ids"]
+pub struct AddAccountAction {
+ pub accounts_action: Option<AccountsAction>,
+ pub unk_id_action: SingleUnkIdAction,
+}
+
+pub struct AccountData {
+ pub(crate) relay: AccountRelayData,
+ pub(crate) muted: AccountMutedData,
+}