summaryrefslogtreecommitdiffstats
path: root/src/maillist_view.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/maillist_view.rs')
-rw-r--r--src/maillist_view.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/maillist_view.rs b/src/maillist_view.rs
index 2ce9b83..3de8e9f 100644
--- a/src/maillist_view.rs
+++ b/src/maillist_view.rs
@@ -118,13 +118,11 @@ impl MaillistView {
// Why do I have to do this? This is UGLY!
let n = n.clone();
let db_path = db_path.clone();
+ let name = format!("{}-{}", n, mail_id);
+ let mv = MailView::create_for(db_path, mail_id, filename, name).unwrap();
- siv.call_on_name(crate::main_view::MAIN_VIEW_NAME, move |main_view: &mut MainView| {
- let name = format!("{}-{}", n, mail_id);
- debug!("Creating MailView '{}' for {} ({}) in {}", name, mail_id, filename.display(), db_path.display());
- let mv = MailView::create_for(db_path, mail_id, filename, name.clone()).unwrap();
-
- main_view.add_tab(name, mv);
+ siv.call_on_name(crate::main_view::MAIN_MUX_NAME, move |mux: &mut cursive_multiplex::Mux| {
+ mux.add_right_of(mv, mux.root().build().unwrap());
});
// use the mail ID to get the whole thread and open it as a table item