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

Method activeChat

Telegram/SourceFiles/info/info_wrap_widget.cpp:308–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306}
307
308Dialogs::RowDescriptor WrapWidget::activeChat() const {
309 if (const auto peer = key().peer()) {
310 return Dialogs::RowDescriptor(
311 peer->owner().history(peer),
312 FullMsgId());
313 } else if (const auto storiesPeer = key().storiesPeer()) {
314 return (key().storiesAlbumId() == Stories::ArchiveId())
315 ? Dialogs::RowDescriptor()
316 : Dialogs::RowDescriptor(
317 storiesPeer->owner().history(storiesPeer),
318 FullMsgId());
319 } else if (const auto giftsPeer = key().giftsPeer()) {
320 return Dialogs::RowDescriptor(
321 giftsPeer->owner().history(giftsPeer),
322 FullMsgId());
323 } else if (const auto musicPeer = key().musicPeer()) {
324 return Dialogs::RowDescriptor(
325 musicPeer->owner().history(musicPeer),
326 FullMsgId());
327 } else if (key().settingsSelf()
328 || key().isDownloads()
329 || key().reactionsContextId()
330 || key().poll()
331 || key().starrefPeer()
332 || key().statisticsTag().peer) {
333 return Dialogs::RowDescriptor();
334 }
335 Unexpected("Owner in WrapWidget::activeChat().");
336}
337
338void WrapWidget::forceContentRepaint() {
339 // WA_OpaquePaintEvent on TopBar creates render glitches when

Callers 3

showSectionMethod · 0.45
showNewSectionMethod · 0.45
handleHistoryBackMethod · 0.45

Calls 15

ArchiveIdFunction · 0.85
RowDescriptorClass · 0.50
FullMsgIdClass · 0.50
peerMethod · 0.45
historyMethod · 0.45
ownerMethod · 0.45
storiesPeerMethod · 0.45
storiesAlbumIdMethod · 0.45
giftsPeerMethod · 0.45
musicPeerMethod · 0.45
settingsSelfMethod · 0.45
isDownloadsMethod · 0.45

Tested by

no test coverage detected