ui: rename read/unread uses to seen/unseen

embed
Manos Pitsidianakis 2019-07-18 20:23:02 +03:00
parent a62f1d6c01
commit 6e63e8a6f6
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
3 changed files with 10 additions and 10 deletions

View File

@ -1195,9 +1195,9 @@ impl Component for CompactListing {
self.filter(filter_term, context); self.filter(filter_term, context);
self.dirty = true; self.dirty = true;
} }
Action::Listing(a @ SetRead) Action::Listing(a @ ListingAction::SetSeen)
| Action::Listing(a @ SetUnread) | Action::Listing(a @ ListingAction::SetUnseen)
| Action::Listing(a @ Delete) => { | Action::Listing(a @ ListingAction::Delete) => {
/* Iterate over selection if exists, else only over the envelope under the /* Iterate over selection if exists, else only over the envelope under the
* cursor. Using two iterators allows chaining them which results into a Chain * cursor. Using two iterators allows chaining them which results into a Chain
* type. We can't conditonally select either a slice iterator or a Map iterator * type. We can't conditonally select either a slice iterator or a Map iterator
@ -1225,7 +1225,7 @@ impl Component for CompactListing {
continue; continue;
} }
match a { match a {
SetRead => { ListingAction::SetSeen => {
let hash = account.get_env(&i).hash(); let hash = account.get_env(&i).hash();
let op = account.operation(hash); let op = account.operation(hash);
let envelope: &mut Envelope = &mut account.get_env_mut(&i); let envelope: &mut Envelope = &mut account.get_env_mut(&i);
@ -1236,7 +1236,7 @@ impl Component for CompactListing {
} }
self.row_updates.push(i); self.row_updates.push(i);
} }
SetUnread => { ListingAction::SetUnseen => {
let hash = account.get_env(&i).hash(); let hash = account.get_env(&i).hash();
let op = account.operation(hash); let op = account.operation(hash);
let envelope: &mut Envelope = &mut account.get_env_mut(&i); let envelope: &mut Envelope = &mut account.get_env_mut(&i);
@ -1247,7 +1247,7 @@ impl Component for CompactListing {
} }
self.row_updates.push(i); self.row_updates.push(i);
} }
Delete => { /* do nothing */ } ListingAction::Delete => { /* do nothing */ }
_ => unreachable!(), _ => unreachable!(),
} }
} }

View File

@ -49,8 +49,8 @@ define_commands!([
preceded!( preceded!(
ws!(tag!("set")), ws!(tag!("set")),
alt_complete!( alt_complete!(
map!(ws!(tag!("read")), |_| Listing(SetRead)) map!(ws!(tag!("seen")), |_| Listing(SetSeen))
| map!(ws!(tag!("unread")), |_| Listing(SetUnread)) | map!(ws!(tag!("unseen")), |_| Listing(SetUnseen))
) )
) | map!(ws!(tag!("delete")), |_| Listing(Delete)) ) | map!(ws!(tag!("delete")), |_| Listing(Delete))
) )

View File

@ -37,8 +37,8 @@ pub enum ListingAction {
SetThreaded, SetThreaded,
SetCompact, SetCompact,
Filter(String), Filter(String),
SetRead, SetSeen,
SetUnread, SetUnseen,
Delete, Delete,
} }