browse: fix regression of scroll to top

This commit is contained in:
FliegendeWurst 2021-04-25 11:00:58 +02:00 committed by Arne Keller
parent 00e5ddf5c6
commit 0f25f11410

View File

@ -316,7 +316,8 @@ fn show_listing(mailbox: &str) -> Result<()> {
MAIL_FULLSCREEN.store(true, Ordering::SeqCst); MAIL_FULLSCREEN.store(true, Ordering::SeqCst);
} }
}); });
let mail_content = mail_content.scrollable().with_name("mail_scroller"); let mail_content: MailScrollerView = mail_content.scrollable();
let mail_content = mail_content.with_name("mail_scroller");
let mut mail_part_select = TreeView::<MailPart>::new(); let mut mail_part_select = TreeView::<MailPart>::new();
mail_part_select.set_on_select(|siv, row| { mail_part_select.set_on_select(|siv, row| {
let mail = siv.call_on_name("part_select", |tree: &mut TreeView<MailPart>| { let mail = siv.call_on_name("part_select", |tree: &mut TreeView<MailPart>| {
@ -410,7 +411,7 @@ fn show_listing(mailbox: &str) -> Result<()> {
Ok(()) Ok(())
} }
type MailScrollerView = ScrollView<NamedView<MailView>>; type MailScrollerView = ScrollView<OnEventView<NamedView<MailView>>>;
type MailView = TextView; type MailView = TextView;
type MailTreeView<'a> = TreeView<&'a EasyMail<'a>>; type MailTreeView<'a> = TreeView<&'a EasyMail<'a>>;