From 0f25f11410ac49c58099461b774cc7c4fedc7dfb Mon Sep 17 00:00:00 2001 From: FliegendeWurst <2012gdwu+github@posteo.de> Date: Sun, 25 Apr 2021 11:00:58 +0200 Subject: [PATCH] browse: fix regression of scroll to top --- src/bin/browse.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bin/browse.rs b/src/bin/browse.rs index df3db97..c8aeb4d 100644 --- a/src/bin/browse.rs +++ b/src/bin/browse.rs @@ -316,7 +316,8 @@ fn show_listing(mailbox: &str) -> Result<()> { 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::::new(); mail_part_select.set_on_select(|siv, row| { let mail = siv.call_on_name("part_select", |tree: &mut TreeView| { @@ -410,7 +411,7 @@ fn show_listing(mailbox: &str) -> Result<()> { Ok(()) } -type MailScrollerView = ScrollView>; +type MailScrollerView = ScrollView>>; type MailView = TextView; type MailTreeView<'a> = TreeView<&'a EasyMail<'a>>;