Browse Source

ui: rename read/unread uses to seen/unseen

tags/pre-alpha-0.2.0
Manos Pitsidianakis 2 years ago
parent
commit
6e63e8a6f6
Signed by untrusted user: epilys GPG Key ID: 73627C2F690DF710
  1. 12
      ui/src/components/mail/listing/compact.rs
  2. 4
      ui/src/execute.rs
  3. 4
      ui/src/execute/actions.rs

12
ui/src/components/mail/listing/compact.rs

@ -1195,9 +1195,9 @@ impl Component for CompactListing {
self.filter(filter_term, context);
self.dirty = true;
}
Action::Listing(a @ SetRead)
| Action::Listing(a @ SetUnread)
| Action::Listing(a @ Delete) => {
Action::Listing(a @ ListingAction::SetSeen)
| Action::Listing(a @ ListingAction::SetUnseen)
| Action::Listing(a @ ListingAction::Delete) => {
/* Iterate over selection if exists, else only over the envelope under the
* 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
@ -1225,7 +1225,7 @@ impl Component for CompactListing {
continue;
}
match a {
SetRead => {
ListingAction::SetSeen => {
let hash = account.get_env(&i).hash();
let op = account.operation(hash);
let envelope: &mut Envelope = &mut account.get_env_mut(&i);
@ -1236,7 +1236,7 @@ impl Component for CompactListing {
}
self.row_updates.push(i);
}
SetUnread => {
ListingAction::SetUnseen => {
let hash = account.get_env(&i).hash();
let op = account.operation(hash);
let envelope: &mut Envelope = &mut account.get_env_mut(&i);
@ -1247,7 +1247,7 @@ impl Component for CompactListing {
}
self.row_updates.push(i);
}
Delete => { /* do nothing */ }
ListingAction::Delete => { /* do nothing */ }
_ => unreachable!(),
}
}

4
ui/src/execute.rs

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

4
ui/src/execute/actions.rs

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

Loading…
Cancel
Save