Make modify and delete commands respect rc.recurrence.confirmation config option.

This commit is contained in:
HTunne 2020-09-20 12:14:30 +01:00 committed by Paul Beckingham
parent c47c7536f5
commit 75c0e41fcc
2 changed files with 7 additions and 5 deletions

View file

@ -137,9 +137,10 @@ int CmdDelete::execute (std::string&)
else
{
std::vector <Task> children = Context::getContext ().tdb2.children (task);
if (children.size () &&
(Context::getContext ().config.getBoolean ("recurrence.confirmation") ||
confirm (STRING_CMD_DELETE_CONFIRM_R)))
if (children.size() &&
((Context::getContext ().config.get ("recurrence.confirmation") == "prompt"
&& confirm (STRING_CMD_DELETE_CONFIRM_R)) ||
Context::getContext ().config.getBoolean ("recurrence.confirmation")))
{
for (auto& child : children)
{

View file

@ -200,8 +200,9 @@ int CmdModify::modifyRecurrenceParent (
auto children = Context::getContext ().tdb2.children (task);
if (children.size () &&
(! Context::getContext ().config.getBoolean ("recurrence.confirmation") ||
confirm (STRING_CMD_MODIFY_RECUR)))
((Context::getContext ().config.get ("recurrence.confirmation") == "prompt"
&& confirm (STRING_CMD_MODIFY_RECUR)) ||
Context::getContext ().config.getBoolean ("recurrence.confirmation")))
{
for (auto& child : children)
{