mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-30 02:17:21 +02:00
Hooks
- Added notes regarding the use of 'first', which may be problematic.
This commit is contained in:
parent
fe549094e3
commit
6dff1f36bf
1 changed files with 3 additions and 0 deletions
|
@ -104,6 +104,7 @@ void Hooks::onLaunch ()
|
||||||
{
|
{
|
||||||
if (line->length () && (*line)[0] == '{')
|
if (line->length () && (*line)[0] == '{')
|
||||||
{
|
{
|
||||||
|
// Only 'add' is possible.
|
||||||
Task newTask (*line);
|
Task newTask (*line);
|
||||||
context.tdb2.add (newTask);
|
context.tdb2.add (newTask);
|
||||||
}
|
}
|
||||||
|
@ -210,6 +211,7 @@ void Hooks::onAdd (Task& after)
|
||||||
{
|
{
|
||||||
Task newTask (*line);
|
Task newTask (*line);
|
||||||
|
|
||||||
|
// TODO Not sure if this first/!first thing is good.
|
||||||
if (first)
|
if (first)
|
||||||
{
|
{
|
||||||
after = newTask;
|
after = newTask;
|
||||||
|
@ -281,6 +283,7 @@ void Hooks::onModify (const Task& before, Task& after)
|
||||||
{
|
{
|
||||||
Task newTask (*line);
|
Task newTask (*line);
|
||||||
|
|
||||||
|
// TODO Not sure if this first/!first thing is good.
|
||||||
if (first)
|
if (first)
|
||||||
{
|
{
|
||||||
after = newTask;
|
after = newTask;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue