2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Check premium for todo lists actions.

This commit is contained in:
John Preston
2025-06-10 20:25:24 +04:00
parent e5de8e22b7
commit bf217bf7aa
12 changed files with 155 additions and 8 deletions

View File

@@ -4142,6 +4142,19 @@ not_null<TodoListData*> Session::processTodoList(
return result;
}
not_null<TodoListData*> Session::duplicateTodoList(
TodoListId id,
not_null<TodoListData*> existing) {
const auto result = todoList(id);
result->title = existing->title;
result->items = existing->items;
for (auto &item : result->items) {
item.completedBy = nullptr;
item.completionDate = TimeId();
}
return result;
}
void Session::checkPollsClosings() {
const auto now = base::unixtime::now();
auto closest = 0;