mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 15:04:57 +00:00
Allow fully editing todo lists.
This commit is contained in:
@@ -7,8 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#include "api/api_todo_lists.h"
|
||||
|
||||
//#include "api/api_common.h"
|
||||
//#include "api/api_updates.h"
|
||||
#include "api/api_editing.h"
|
||||
#include "apiwrap.h"
|
||||
#include "base/random.h"
|
||||
#include "data/business/data_shortcut_messages.h" // ShortcutIdToMTP
|
||||
@@ -134,6 +133,23 @@ void TodoLists::create(
|
||||
});
|
||||
}
|
||||
|
||||
void TodoLists::edit(
|
||||
not_null<HistoryItem*> item,
|
||||
const TodoListData &data,
|
||||
SendOptions options,
|
||||
Fn<void()> done,
|
||||
Fn<void(QString)> fail) {
|
||||
EditTodoList(item, data, options, [=](mtpRequestId) {
|
||||
if (const auto onstack = done) {
|
||||
onstack();
|
||||
}
|
||||
}, [=](const QString &error, mtpRequestId) {
|
||||
if (const auto onstack = fail) {
|
||||
onstack(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void TodoLists::add(
|
||||
not_null<HistoryItem*> item,
|
||||
const std::vector<TodoListItem> &items,
|
||||
|
||||
Reference in New Issue
Block a user