columns: enable toolbar scroll to top

Fixes: https://github.com/damus-io/notedeck/issues/969
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2025-07-15 13:29:59 -07:00
parent 074472eec9
commit ac22fc7072
7 changed files with 98 additions and 24 deletions

View File

@@ -40,6 +40,10 @@ impl DecksCache {
self.active_columns(accounts).and_then(|ad| ad.selected())
}
pub fn selected_column_index(&self, accounts: &notedeck::Accounts) -> Option<usize> {
self.active_columns(accounts).map(|ad| ad.selected as usize)
}
/// Gets a mutable reference to the active columns
pub fn active_columns_mut(&mut self, accounts: &notedeck::Accounts) -> Option<&mut Columns> {
let account = accounts.get_selected_account();