mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-19 09:34:19 +01:00
AccountData: decouple query from constructor
the ndb query must be as close to the subscription as possible to avoid events falling through the cracks Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
@@ -78,9 +78,11 @@ impl SwitchingAction {
|
||||
match &self {
|
||||
SwitchingAction::Accounts(account_action) => match account_action {
|
||||
AccountsAction::Switch(switch_action) => {
|
||||
let txn = Transaction::new(ctx.ndb).expect("txn");
|
||||
ctx.accounts.select_account(
|
||||
&switch_action.switch_to,
|
||||
ctx.ndb,
|
||||
&txn,
|
||||
ctx.pool,
|
||||
ui_ctx,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user