forked from janek/mostr
style(tasks): some bits of documentation
This commit is contained in:
parent
0744e86922
commit
cb75a5749f
10
src/tasks.rs
10
src/tasks.rs
|
@ -201,9 +201,10 @@ impl Tasks {
|
|||
last = new;
|
||||
}
|
||||
}
|
||||
// TODO show history for active tags
|
||||
("Your Time-Tracking History:".to_string(), Box::from(full.into_iter()))
|
||||
} else {
|
||||
("You have nothing tracked yet".to_string(), Box::from(empty()))
|
||||
("You have nothing time-tracked yet".to_string(), Box::from(empty()))
|
||||
}
|
||||
}
|
||||
Some(id) => {
|
||||
|
@ -680,8 +681,8 @@ impl Tasks {
|
|||
filtered_fuzzy.push(task.event.id)
|
||||
}
|
||||
}
|
||||
for task in self.tasks.values() {
|
||||
// Find global exact match
|
||||
for task in self.tasks.values() {
|
||||
if task.get_filter_title().to_ascii_lowercase() == lowercase_arg &&
|
||||
// exclude closed tasks and their subtasks
|
||||
!self.traverse_up_from(Some(*task.get_id())).any(|t| t.pure_state() == State::Closed) {
|
||||
|
@ -701,7 +702,10 @@ impl Tasks {
|
|||
filtered
|
||||
}
|
||||
|
||||
/// Finds out what to do with the given string.
|
||||
/// Finds out what to do with the given string, one of:
|
||||
/// - filtering the visible tasks
|
||||
/// - entering the only matching task
|
||||
/// - creating a new task
|
||||
/// Returns an EventId if a new Task was created.
|
||||
pub(crate) fn filter_or_create(&mut self, position: Option<&EventId>, arg: &str) -> Option<EventId> {
|
||||
let filtered = self.get_matching(position, arg);
|
||||
|
|
Loading…
Reference in New Issue