mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CmdStop: Added user feedback
This commit is contained in:
parent
aed0933c68
commit
3f931c9e97
1 changed files with 6 additions and 3 deletions
|
@ -41,6 +41,9 @@ int CmdStop (
|
|||
if ( latest.isStarted () &&
|
||||
! latest.isEnded ())
|
||||
{
|
||||
// TODO If there are tags, remove the individual tags.
|
||||
// TODO If there are none, simply close the interval.
|
||||
|
||||
// Stop it.
|
||||
latest.end (Datetime ());
|
||||
|
||||
|
@ -48,13 +51,13 @@ int CmdStop (
|
|||
database.modifyInterval (latest);
|
||||
log.write ("debug", std::string ("Stopped tracking: ") + latest.serialize ());
|
||||
|
||||
// TODO User feedback.
|
||||
// TODO Summarize closed interval.
|
||||
// User feedback.
|
||||
std::cout << latest.summarize ();
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string message = "There is no time currently being tracked.";
|
||||
std::cout << "Warning: " << message << "\n";
|
||||
std::cout << message << "\n";
|
||||
log.write ("warning", message);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue