2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Make HistoryItem a final class.

This commit is contained in:
John Preston
2022-12-14 16:15:46 +04:00
parent 36de2e98d4
commit 1b73b34810
62 changed files with 4662 additions and 5116 deletions

View File

@@ -9,9 +9,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "history/view/history_view_element.h"
#include "history/view/history_view_item_preview.h"
#include "history/history_message.h"
#include "history/history_service.h"
#include "history/history_item.h"
#include "history/history_item_components.h"
#include "history/history_item_helpers.h"
#include "history/history_inner_widget.h"
#include "history/history_unread_things.h"
#include "dialogs/dialogs_indexed_list.h"
@@ -419,7 +419,9 @@ not_null<HistoryItem*> History::createItem(
}
return result;
}
return HistoryItem::Create(this, id, message, localFlags);
return message.match([&](const auto &data) {
return makeMessage(id, data, localFlags);
});
}
std::vector<not_null<HistoryItem*>> History::createItems(
@@ -3080,7 +3082,7 @@ MsgRange History::rangeForDifferenceRequest() const {
return MsgRange();
}
HistoryService *History::insertJoinedMessage() {
HistoryItem *History::insertJoinedMessage() {
const auto channel = peer->asChannel();
if (!channel
|| _joinedMessage