Hooks
- Added notes regarding the use of 'first', which may be problematic.
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user