mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CmdContinue: Simplified code
This commit is contained in:
parent
023d4ba1bc
commit
990117a4c9
1 changed files with 1 additions and 6 deletions
|
@ -37,8 +37,7 @@ int CmdContinue (
|
|||
auto latest = getLatestInterval (database);
|
||||
if (! latest.empty ())
|
||||
{
|
||||
if (latest.range.started () &&
|
||||
latest.range.ended ())
|
||||
if (! latest.range.open ())
|
||||
{
|
||||
// Open an identical interval.
|
||||
latest.range.start = Datetime ();
|
||||
|
@ -51,14 +50,10 @@ int CmdContinue (
|
|||
std::cout << intervalSummarize (rules, latest);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "There is already active tracking.\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "There is no previous tracking to continue.\n";
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue