mail/listing.rs: prevent list blank when refreshing account
Mail list would go blank if the currently focused account received a Status update event.duesee/experiment/use_imap_codec
parent
428f752b20
commit
91557c2c43
|
@ -147,15 +147,15 @@ impl MailboxConf {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn true_val() -> bool {
|
pub const fn true_val() -> bool {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn false_val() -> bool {
|
pub const fn false_val() -> bool {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn none<T>() -> Option<T> {
|
pub const fn none<T>() -> Option<T> {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
* along with meli. If not, see <http://www.gnu.org/licenses/>.
|
* along with meli. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! Entities that handle Mail specific functions.
|
//! Entities that handle Mail specific functions.
|
||||||
*/
|
|
||||||
use melib::{
|
use melib::{
|
||||||
backends::{AccountHash, Mailbox, MailboxHash},
|
backends::{AccountHash, Mailbox, MailboxHash},
|
||||||
email::{attachment_types::*, attachments::*},
|
email::{attachment_types::*, attachments::*},
|
||||||
|
|
|
@ -1037,7 +1037,6 @@ impl Component for Listing {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.collect::<_>();
|
.collect::<_>();
|
||||||
self.set_dirty(true);
|
|
||||||
self.menu_content.empty();
|
self.menu_content.empty();
|
||||||
context
|
context
|
||||||
.replies
|
.replies
|
||||||
|
@ -1945,6 +1944,7 @@ impl Component for Listing {
|
||||||
}
|
}
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_dirty(&self) -> bool {
|
fn is_dirty(&self) -> bool {
|
||||||
self.dirty
|
self.dirty
|
||||||
|| self
|
|| self
|
||||||
|
@ -1953,6 +1953,7 @@ impl Component for Listing {
|
||||||
.map(Component::is_dirty)
|
.map(Component::is_dirty)
|
||||||
.unwrap_or_else(|| self.component.is_dirty())
|
.unwrap_or_else(|| self.component.is_dirty())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_dirty(&mut self, value: bool) {
|
fn set_dirty(&mut self, value: bool) {
|
||||||
self.dirty = value;
|
self.dirty = value;
|
||||||
if let Some(s) = self.status.as_mut() {
|
if let Some(s) = self.status.as_mut() {
|
||||||
|
@ -2577,6 +2578,7 @@ impl Listing {
|
||||||
.process_event(&mut UIEvent::VisibilityChange(false), context);
|
.process_event(&mut UIEvent::VisibilityChange(false), context);
|
||||||
self.component
|
self.component
|
||||||
.set_coordinates((account_hash, *mailbox_hash));
|
.set_coordinates((account_hash, *mailbox_hash));
|
||||||
|
self.component.refresh_mailbox(context, true);
|
||||||
/* Check if per-mailbox configuration overrides general configuration */
|
/* Check if per-mailbox configuration overrides general configuration */
|
||||||
|
|
||||||
let index_style =
|
let index_style =
|
||||||
|
|
Loading…
Reference in New Issue