chrome: use actual columns noteaction executor
there is code duplication here and it is causing bugs
This commit is contained in:
@@ -38,11 +38,17 @@ impl Default for DecksCache {
|
||||
impl DecksCache {
|
||||
/// Gets the first column in the currently active user's active deck
|
||||
pub fn first_column_mut(&mut self, accounts: ¬edeck::Accounts) -> Option<&mut Column> {
|
||||
self.active_columns_mut(accounts)
|
||||
.and_then(|ad| ad.columns_mut().first_mut())
|
||||
}
|
||||
|
||||
/// Gets the active columns
|
||||
pub fn active_columns_mut(&mut self, accounts: ¬edeck::Accounts) -> Option<&mut Columns> {
|
||||
let account = accounts.get_selected_account()?;
|
||||
|
||||
self.decks_mut(&account.key.pubkey)
|
||||
.active_deck_mut()
|
||||
.and_then(|ad| ad.columns_mut().columns_mut().first_mut())
|
||||
.map(|ad| ad.columns_mut())
|
||||
}
|
||||
|
||||
pub fn new(mut account_to_decks: HashMap<Pubkey, Decks>) -> Self {
|
||||
|
||||
@@ -4,7 +4,7 @@ mod error;
|
||||
//mod note;
|
||||
//mod block;
|
||||
pub mod accounts;
|
||||
mod actionbar;
|
||||
pub mod actionbar;
|
||||
pub mod app_creation;
|
||||
mod app_style;
|
||||
mod args;
|
||||
|
||||
Reference in New Issue
Block a user