mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
CmdStart: Switched to Range::open
This commit is contained in:
parent
a18efd463d
commit
023d4ba1bc
1 changed files with 2 additions and 3 deletions
|
@ -43,8 +43,7 @@ int CmdStart (
|
||||||
|
|
||||||
// If the latest interval is open, close it.
|
// If the latest interval is open, close it.
|
||||||
auto latest = getLatestInterval (database);
|
auto latest = getLatestInterval (database);
|
||||||
if ( latest.range.started () &&
|
if (latest.open ())
|
||||||
! latest.range.ended ())
|
|
||||||
{
|
{
|
||||||
// Stop it.
|
// Stop it.
|
||||||
Interval modified {latest};
|
Interval modified {latest};
|
||||||
|
@ -71,7 +70,7 @@ int CmdStart (
|
||||||
for (auto& tag : filter.tags ())
|
for (auto& tag : filter.tags ())
|
||||||
now.tag (tag);
|
now.tag (tag);
|
||||||
|
|
||||||
// Update database.
|
// Update database. An open interval does not need to be flattened.
|
||||||
database.addInterval (now);
|
database.addInterval (now);
|
||||||
|
|
||||||
// TODO intervalSummarїze needs to operate on a vector of similar intervals.
|
// TODO intervalSummarїze needs to operate on a vector of similar intervals.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue