Compare commits
No commits in common. "a8fb3f919dca1d48dbba6fb73d247a3308716240" and "b26d64646c0edddf4c1b3f6063dde8d448c4ac25" have entirely different histories.
a8fb3f919d
...
b26d64646c
1 changed files with 9 additions and 11 deletions
20
src/tasks.rs
20
src/tasks.rs
|
@ -308,7 +308,7 @@ impl TasksRelay {
|
|||
"{} - {} by {}",
|
||||
format_timestamp_local(start),
|
||||
format_timestamp_relative_to(end, start),
|
||||
self.get_displayname(key)
|
||||
self.get_username(key)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
@ -316,7 +316,7 @@ impl TasksRelay {
|
|||
vec.push(format!(
|
||||
"{} started by {}",
|
||||
format_timestamp_local(stamp),
|
||||
self.get_displayname(key)
|
||||
self.get_username(key)
|
||||
))
|
||||
});
|
||||
vec
|
||||
|
@ -392,7 +392,7 @@ impl TasksRelay {
|
|||
None => { prompt.push_str(" @ALL"); }
|
||||
Some(key) =>
|
||||
if key != self.sender.pubkey() {
|
||||
prompt.push_str(" @");
|
||||
prompt.push_str(" ");
|
||||
prompt.push_str(&self.get_username(&key))
|
||||
},
|
||||
}
|
||||
|
@ -1293,17 +1293,15 @@ impl TasksRelay {
|
|||
.tags(ids.into_iter()
|
||||
.map(|e| self.make_event_tag_from_id(e, MARKER_PROPERTY)))
|
||||
.tags(tags);
|
||||
// if self.custom_time.is_none() && self.get_by_id(id).map(|task| {}) {}
|
||||
info!(
|
||||
"Task status {} set for \"{}\"{}{}",
|
||||
"Task status {} set for \"{}\"{}",
|
||||
TaskState::get_label_for(&state, comment),
|
||||
self.get_task_title(&id),
|
||||
self.custom_time
|
||||
.map(|ts| format!(" at {}", format_timestamp_relative(&ts)))
|
||||
.unwrap_or_default(),
|
||||
self.get_by_id(&id)
|
||||
.and_then(|task| task.state_at(self.custom_time.unwrap_or_default()))
|
||||
.map(|ts| format!(" from {}", ts))
|
||||
.unwrap_or_default());
|
||||
.unwrap_or_default()
|
||||
);
|
||||
self.submit(prop)
|
||||
}
|
||||
|
||||
|
@ -1384,10 +1382,10 @@ impl Display for TasksRelay {
|
|||
}
|
||||
writeln!(
|
||||
lock,
|
||||
"Active from {} (total tracked time {}m) - {} since {}",
|
||||
"Active from {} (total tracked time {}m) - State {} since {}",
|
||||
tracking_stamp.map_or("?".to_string(), |t| format_timestamp_relative(&t)),
|
||||
self.time_tracked(*t.get_id()) / 60,
|
||||
state,
|
||||
state.get_label(),
|
||||
format_timestamp_relative(&state.time)
|
||||
)?;
|
||||
for d in t.descriptions().rev() { writeln!(lock, "{}", d)?; }
|
||||
|
|
Loading…
Add table
Reference in a new issue