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

Method addToEnd

Telegram/SourceFiles/dialogs/dialogs_list.cpp:27–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27not_null<Row*> List::addToEnd(Key key) {
28 if (const auto result = getRow(key)) {
29 return result;
30 }
31 const auto result = _rowByKey.emplace(
32 key,
33 std::make_unique<Row>(key, _rows.size(), height())
34 ).first->second.get();
35 result->recountHeight(_narrowRatio, _filterId);
36 _rows.emplace_back(result);
37 if (_sortMode == SortMode::Date) {
38 adjustByDate(result);
39 }
40 return result;
41}
42
43Row *List::adjustByName(Key key) {
44 Expects(_sortMode == SortMode::Name);

Callers 4

InnerMethod · 0.45
changeCheckStateMethod · 0.45
applyChatFilterMethod · 0.45
addEntryMethod · 0.45

Calls 4

emplaceMethod · 0.80
getMethod · 0.45
sizeMethod · 0.45
recountHeightMethod · 0.45

Tested by

no test coverage detected