Some internal HistoryItem refactoring.

Replace most IsServerMsgId / id <=> 0 with isRegular().
Track isLocal / isHistoryEntry in flags.
Remove toHistoryMessage.
This commit is contained in:
John Preston
2021-11-07 12:06:00 +04:00
parent 22b37c4bf8
commit c534f3f22e
52 changed files with 460 additions and 524 deletions
+1 -2
View File
@@ -182,8 +182,7 @@ void Polls::close(not_null<HistoryItem*> item) {
void Polls::reloadResults(not_null<HistoryItem*> item) {
const auto itemId = item->fullId();
if (!IsServerMsgId(item->id)
|| _pollReloadRequestIds.contains(itemId)) {
if (!item->isRegular() || _pollReloadRequestIds.contains(itemId)) {
return;
}
const auto requestId = _api.request(MTPmessages_GetPollResults(