New user preference: open new tasks in edit mode
This commit is contained in:
Vendored
+3
@@ -11595,6 +11595,9 @@ var process=require("__browserify_process");(function() {
|
||||
var task;
|
||||
task = api.taskDefaults(req.body);
|
||||
user["" + task.type + "s"].unshift(task);
|
||||
if (user.preferences.newTaskEdit) {
|
||||
task._editing = true;
|
||||
}
|
||||
if (typeof cb === "function") {
|
||||
cb(null, task);
|
||||
}
|
||||
|
||||
@@ -497,6 +497,7 @@ api.wrap = (user, main=true) ->
|
||||
addTask: (req, cb) ->
|
||||
task = api.taskDefaults(req.body)
|
||||
user["#{task.type}s"].unshift(task)
|
||||
if user.preferences.newTaskEdit then task._editing = true
|
||||
cb? null, task
|
||||
task
|
||||
|
||||
|
||||
Reference in New Issue
Block a user