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

Method preloadUserpic

Telegram/SourceFiles/boxes/share_box.cpp:1129–1142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1127}
1128
1129void ShareBox::Inner::preloadUserpic(not_null<Dialogs::Entry*> entry) {
1130 entry->chatListPreloadData();
1131 const auto history = entry->asHistory();
1132 if (!_descriptor.moneyRestrictionError || !history) {
1133 return;
1134 } else if (!Api::ResolveMessageMoneyRestrictions(
1135 history->peer,
1136 history).known) {
1137 if (const auto user = history->peer->asUser()) {
1138 const auto api = &_descriptor.session->api();
1139 api->premium().resolveMessageMoneyRestrictions(user);
1140 }
1141 }
1142}
1143
1144auto ShareBox::Inner::getChat(not_null<Dialogs::Row*> row)
1145-> not_null<Chat*> {

Callers

nothing calls this directly

Calls 7

asHistoryMethod · 0.80
asUserMethod · 0.80
apiMethod · 0.80
chatListPreloadDataMethod · 0.45
premiumMethod · 0.45

Tested by

no test coverage detected