parent
415ce2a27e
commit
832d1243de
|
@ -52,6 +52,7 @@ impl ViewMode {
|
||||||
/// menus
|
/// menus
|
||||||
pub struct MailView {
|
pub struct MailView {
|
||||||
coordinates: (usize, usize, usize),
|
coordinates: (usize, usize, usize),
|
||||||
|
local_collection: Vec<usize>,
|
||||||
pager: Option<Pager>,
|
pager: Option<Pager>,
|
||||||
subview: Option<Box<Component>>,
|
subview: Option<Box<Component>>,
|
||||||
dirty: bool,
|
dirty: bool,
|
||||||
|
@ -70,11 +71,13 @@ impl fmt::Display for MailView {
|
||||||
impl MailView {
|
impl MailView {
|
||||||
pub fn new(
|
pub fn new(
|
||||||
coordinates: (usize, usize, usize),
|
coordinates: (usize, usize, usize),
|
||||||
|
local_collection: Vec<usize>,
|
||||||
pager: Option<Pager>,
|
pager: Option<Pager>,
|
||||||
subview: Option<Box<Component>>,
|
subview: Option<Box<Component>>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
MailView {
|
MailView {
|
||||||
coordinates,
|
coordinates,
|
||||||
|
local_collection,
|
||||||
pager,
|
pager,
|
||||||
subview,
|
subview,
|
||||||
dirty: true,
|
dirty: true,
|
||||||
|
@ -218,7 +221,7 @@ impl Component for MailView {
|
||||||
let envelope_idx: usize = if threaded {
|
let envelope_idx: usize = if threaded {
|
||||||
mailbox.threaded_mail(self.coordinates.2)
|
mailbox.threaded_mail(self.coordinates.2)
|
||||||
} else {
|
} else {
|
||||||
self.coordinates.2
|
self.local_collection[self.coordinates.2]
|
||||||
};
|
};
|
||||||
|
|
||||||
let envelope: &Envelope = &mailbox.collection[envelope_idx];
|
let envelope: &Envelope = &mailbox.collection[envelope_idx];
|
||||||
|
@ -381,7 +384,7 @@ impl Component for MailView {
|
||||||
let envelope_idx: usize = if threaded {
|
let envelope_idx: usize = if threaded {
|
||||||
mailbox.threaded_mail(self.coordinates.2)
|
mailbox.threaded_mail(self.coordinates.2)
|
||||||
} else {
|
} else {
|
||||||
self.coordinates.2
|
self.local_collection[self.coordinates.2]
|
||||||
};
|
};
|
||||||
|
|
||||||
let envelope: &Envelope = &mailbox.collection[envelope_idx];
|
let envelope: &Envelope = &mailbox.collection[envelope_idx];
|
||||||
|
@ -453,7 +456,7 @@ impl Component for MailView {
|
||||||
let envelope_idx: usize = if threaded {
|
let envelope_idx: usize = if threaded {
|
||||||
mailbox.threaded_mail(self.coordinates.2)
|
mailbox.threaded_mail(self.coordinates.2)
|
||||||
} else {
|
} else {
|
||||||
self.coordinates.2
|
self.local_collection[self.coordinates.2]
|
||||||
};
|
};
|
||||||
|
|
||||||
let envelope: &Envelope = &mailbox.collection[envelope_idx];
|
let envelope: &Envelope = &mailbox.collection[envelope_idx];
|
||||||
|
|
Loading…
Reference in New Issue