2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Support task lists view/update/actions.

This commit is contained in:
John Preston
2025-06-06 18:24:44 +04:00
parent 06db13a0ab
commit a97d1b8669
27 changed files with 1983 additions and 43 deletions

View File

@@ -46,6 +46,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_document.h"
#include "data/data_histories.h"
#include "data/data_history_messages.h"
#include "data/data_todo_list.h"
#include "lang/lang_keys.h"
#include "apiwrap.h"
#include "api/api_chat_participants.h"
@@ -1331,6 +1332,28 @@ void History::applyServiceChanges(
Core::App().calls().showConferenceInvite(user, item->id);
}
}
}, [&](const MTPDmessageActionTodoCompletions &data) {
if (const auto done = item->Get<HistoryServiceTodoCompletions>()) {
const auto list = done->msg
? done->msg
: owner().message(peer, done->msgId);
if (const auto media = list ? list->media() : nullptr) {
if (const auto todolist = media->todolist()) {
todolist->apply(item, data);
}
}
}
}, [&](const MTPDmessageActionTodoAppendTasks &data) {
if (const auto done = item->Get<HistoryServiceTodoCompletions>()) {
const auto list = done->msg
? done->msg
: owner().message(peer, done->msgId);
if (const auto media = list ? list->media() : nullptr) {
if (const auto todolist = media->todolist()) {
todolist->apply(data);
}
}
}
}, [](const auto &) {
});
}