MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / TodoListDataToMTP

Function TodoListDataToMTP

Telegram/SourceFiles/data/data_todo_list.cpp:191–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191MTPTodoList TodoListDataToMTP(not_null<const TodoListData*> todolist) {
192 using Flag = MTPDtodoList::Flag;
193 const auto flags = Flag()
194 | (todolist->othersCanAppend()
195 ? Flag::f_others_can_append
196 : Flag())
197 | (todolist->othersCanComplete()
198 ? Flag::f_others_can_complete
199 : Flag());
200 return MTP_todoList(
201 MTP_flags(flags),
202 MTP_textWithEntities(
203 MTP_string(todolist->title.text),
204 Api::EntitiesToMTP(
205 &todolist->session(),
206 todolist->title.entities)),
207 TodoListItemsToMTP(&todolist->session(), todolist->items));
208}
209
210MTPInputMedia TodoListDataToInputMedia(
211 not_null<const TodoListData*> todolist) {

Callers 2

TodoListDataToInputMediaFunction · 0.85
EditTodoListFunction · 0.85

Calls 8

MTP_flagsFunction · 0.85
MTP_stringFunction · 0.85
EntitiesToMTPFunction · 0.85
TodoListItemsToMTPFunction · 0.85
othersCanAppendMethod · 0.80
othersCanCompleteMethod · 0.80
FlagEnum · 0.70
sessionMethod · 0.45

Tested by

no test coverage detected