diff --git a/src/components/mail/listing/thread.rs b/src/components/mail/listing/thread.rs index ed347527..705fada0 100644 --- a/src/components/mail/listing/thread.rs +++ b/src/components/mail/listing/thread.rs @@ -1090,7 +1090,12 @@ impl Component for ThreadListing { /* Render the mail body in a pager, basically copy what HSplit does */ let total_rows = get_y(bottom_right) - get_y(upper_left); - let pager_ratio = context.runtime_settings.pager.pager_ratio; + let pager_ratio = *mailbox_settings!( + context[self.cursor_pos.0][&self.cursor_pos.1] + .pager + .pager_ratio + ); + let bottom_entity_rows = (pager_ratio * total_rows) / 100; if bottom_entity_rows > total_rows { diff --git a/src/components/mail/view/thread.rs b/src/components/mail/view/thread.rs index 7d3e2c99..147ab6ff 100644 --- a/src/components/mail/view/thread.rs +++ b/src/components/mail/view/thread.rs @@ -748,7 +748,11 @@ impl ThreadView { let bottom_right = bottom_right!(area); let total_rows = height!(area); - let pager_ratio = context.runtime_settings.pager.pager_ratio; + let pager_ratio = *mailbox_settings!( + context[self.coordinates.0][&self.coordinates.1] + .pager + .pager_ratio + ); let mut bottom_entity_rows = (pager_ratio * total_rows) / 100; if bottom_entity_rows > total_rows { diff --git a/src/state.rs b/src/state.rs index 081d00d2..e5a40b15 100644 --- a/src/state.rs +++ b/src/state.rs @@ -104,7 +104,6 @@ pub struct Context { pub accounts: IndexMap, pub settings: Settings, - pub runtime_settings: Settings, /// Areas of the screen that must be redrawn in the next render pub dirty_areas: VecDeque, @@ -342,8 +341,7 @@ impl State { display_messages_area: ((0, 0), (0, 0)), context: Context { accounts, - settings: settings.clone(), - runtime_settings: settings, + settings: settings, dirty_areas: VecDeque::with_capacity(5), replies: VecDeque::with_capacity(5), temp_files: Vec::new(),