mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
CmdTrack: Made use of new helper functions
This commit is contained in:
parent
50a9caa541
commit
b3b6fe7749
1 changed files with 1 additions and 10 deletions
|
@ -35,17 +35,8 @@ int CmdTrack (
|
|||
Rules& rules,
|
||||
Database& database)
|
||||
{
|
||||
// Set up a filter based on the command line.
|
||||
auto filter = createFilterFromCLI (cli);
|
||||
|
||||
// Add new interval.
|
||||
Interval tracked;
|
||||
tracked.start (filter.start ());
|
||||
tracked.end (filter.end ());
|
||||
for (auto& tag : filter.tags ())
|
||||
tracked.tag (tag);
|
||||
|
||||
// Update database.
|
||||
auto tracked = createIntervalFromFilter (filter);
|
||||
database.addInterval (tracked);
|
||||
|
||||
// User feedback.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue