state: remove runtime_settings
parent
68f9d1220b
commit
e5b0ff4fe2
|
@ -1090,7 +1090,12 @@ impl Component for ThreadListing {
|
||||||
|
|
||||||
/* Render the mail body in a pager, basically copy what HSplit does */
|
/* Render the mail body in a pager, basically copy what HSplit does */
|
||||||
let total_rows = get_y(bottom_right) - get_y(upper_left);
|
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;
|
let bottom_entity_rows = (pager_ratio * total_rows) / 100;
|
||||||
|
|
||||||
if bottom_entity_rows > total_rows {
|
if bottom_entity_rows > total_rows {
|
||||||
|
|
|
@ -748,7 +748,11 @@ impl ThreadView {
|
||||||
let bottom_right = bottom_right!(area);
|
let bottom_right = bottom_right!(area);
|
||||||
let total_rows = height!(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;
|
let mut bottom_entity_rows = (pager_ratio * total_rows) / 100;
|
||||||
|
|
||||||
if bottom_entity_rows > total_rows {
|
if bottom_entity_rows > total_rows {
|
||||||
|
|
|
@ -104,7 +104,6 @@ pub struct Context {
|
||||||
pub accounts: IndexMap<AccountHash, Account>,
|
pub accounts: IndexMap<AccountHash, Account>,
|
||||||
pub settings: Settings,
|
pub settings: Settings,
|
||||||
|
|
||||||
pub runtime_settings: Settings,
|
|
||||||
/// Areas of the screen that must be redrawn in the next render
|
/// Areas of the screen that must be redrawn in the next render
|
||||||
pub dirty_areas: VecDeque<Area>,
|
pub dirty_areas: VecDeque<Area>,
|
||||||
|
|
||||||
|
@ -342,8 +341,7 @@ impl State {
|
||||||
display_messages_area: ((0, 0), (0, 0)),
|
display_messages_area: ((0, 0), (0, 0)),
|
||||||
context: Context {
|
context: Context {
|
||||||
accounts,
|
accounts,
|
||||||
settings: settings.clone(),
|
settings: settings,
|
||||||
runtime_settings: settings,
|
|
||||||
dirty_areas: VecDeque::with_capacity(5),
|
dirty_areas: VecDeque::with_capacity(5),
|
||||||
replies: VecDeque::with_capacity(5),
|
replies: VecDeque::with_capacity(5),
|
||||||
temp_files: Vec::new(),
|
temp_files: Vec::new(),
|
||||||
|
|
Loading…
Reference in New Issue