ui: Remove RefreshMailbox event

Leftover from older versions, it wasn't used  anywhere
async
Manos Pitsidianakis 2020-01-07 12:56:28 +02:00
parent ca7d72e732
commit b6403f486b
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
4 changed files with 0 additions and 28 deletions

View File

@ -106,9 +106,6 @@ impl Component for Indexer {
} }
match *event { match *event {
UIEvent::RefreshMailbox(_) => {
self.dirty = true;
}
UIEvent::ChangeMode(UIMode::Normal) => { UIEvent::ChangeMode(UIMode::Normal) => {
self.dirty = true; self.dirty = true;
} }

View File

@ -530,22 +530,6 @@ impl Component for Listing {
} }
_ => {} _ => {}
}, },
UIEvent::RefreshMailbox((idxa, folder_hash)) => {
self.cursor_pos = (
idxa,
context.accounts[idxa]
.folders_order
.iter()
.position(|&h| h == folder_hash)
.unwrap_or(0),
);
context
.replies
.push_back(UIEvent::StatusEvent(StatusEvent::UpdateStatus(
self.get_status(context).unwrap(),
)));
self.dirty = true;
}
UIEvent::ChangeMode(UIMode::Normal) => { UIEvent::ChangeMode(UIMode::Normal) => {
self.dirty = true; self.dirty = true;
} }

View File

@ -273,10 +273,6 @@ impl ThreadListing {
return; return;
}; };
// Inform State that we changed the current folder view.
context
.replies
.push_back(UIEvent::RefreshMailbox((self.cursor_pos.0, folder_hash)));
// Get mailbox as a reference. // Get mailbox as a reference.
// //
match context.accounts[self.cursor_pos.0].status(folder_hash) { match context.accounts[self.cursor_pos.0].status(folder_hash) {
@ -622,10 +618,6 @@ impl Component for ThreadListing {
self.view = None; self.view = None;
return true; return true;
} }
UIEvent::RefreshMailbox(_) => {
self.dirty = true;
self.view = None;
}
UIEvent::MailboxUpdate((ref idxa, ref idxf)) UIEvent::MailboxUpdate((ref idxa, ref idxf))
if context.accounts[self.new_cursor_pos.0] if context.accounts[self.new_cursor_pos.0]
.folders_order .folders_order

View File

@ -88,7 +88,6 @@ pub enum UIEvent {
ExInput(Key), ExInput(Key),
InsertInput(Key), InsertInput(Key),
EmbedInput((Key, Vec<u8>)), EmbedInput((Key, Vec<u8>)),
RefreshMailbox((usize, FolderHash)), //view has changed to FolderHash mailbox
//Quit? //Quit?
Resize, Resize,
/// Force redraw. /// Force redraw.