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

Method checkDelayed

Telegram/SourceFiles/window/notifications_manager.cpp:632–664  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

630}
631
632void System::checkDelayed() {
633 for (auto i = _settingWaiters.begin(); i != _settingWaiters.end();) {
634 const auto remove = [&] {
635 const auto thread = i->first;
636 const auto peer = thread->peer();
637 const auto fullId = FullMsgId(peer->id, i->second.key.messageId);
638 const auto item = thread->owner().message(fullId);
639 if (!item) {
640 return true;
641 }
642 const auto state = computeSkipState({
643 .item = item,
644 .reactionOrVoteSender = i->second.reactionOrVoteSender,
645 .type = i->second.type,
646 });
647 if (state.value == SkipState::Skip) {
648 return true;
649 } else if (state.value == SkipState::Unknown
650 || !item->notificationReady()) {
651 return false;
652 }
653 _waiters.emplace(i->first, i->second);
654 return true;
655 }();
656 if (remove) {
657 i = _settingWaiters.erase(i);
658 } else {
659 ++i;
660 }
661 }
662 _waitTimer.cancel();
663 showNext();
664}
665
666void System::showGrouped() {
667 Expects(_manager != nullptr);

Callers 4

setIsBlockedMethod · 0.45
applyMethod · 0.45
resetToDefaultMethod · 0.45
clearExceptionsMethod · 0.45

Calls 10

notificationReadyMethod · 0.80
emplaceMethod · 0.80
FullMsgIdClass · 0.50
beginMethod · 0.45
endMethod · 0.45
peerMethod · 0.45
messageMethod · 0.45
ownerMethod · 0.45
eraseMethod · 0.45
cancelMethod · 0.45

Tested by

no test coverage detected