fix: save columns on removal

Fixes: https://github.com/damus-io/notedeck/issues/432
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2024-11-13 15:46:39 -08:00
parent 91016facc7
commit 4c458727a9
3 changed files with 9 additions and 18 deletions

View File

@@ -205,11 +205,12 @@ pub fn render_nav(col: usize, app: &mut Damus, ui: &mut egui::Ui) -> bool {
if let Some(title_response) = nav_response.title_response {
match title_response {
TitleResponse::RemoveColumn => {
app.columns_mut().request_deletion_at_index(col);
let tl = app.columns().find_timeline_for_column_index(col);
if let Some(timeline) = tl {
unsubscribe_timeline(app.ndb(), timeline);
}
app.columns_mut().delete_column(col);
col_changed = true;
}
}
}