ui: rename read/unread uses to seen/unseen
parent
a62f1d6c01
commit
6e63e8a6f6
|
@ -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!(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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))
|
||||||
)
|
)
|
||||||
|
|
|
@ -37,8 +37,8 @@ pub enum ListingAction {
|
||||||
SetThreaded,
|
SetThreaded,
|
||||||
SetCompact,
|
SetCompact,
|
||||||
Filter(String),
|
Filter(String),
|
||||||
SetRead,
|
SetSeen,
|
||||||
SetUnread,
|
SetUnseen,
|
||||||
Delete,
|
Delete,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue