diff --git a/Telegram/SourceFiles/history/history_item.cpp b/Telegram/SourceFiles/history/history_item.cpp index e4ccb977fb..a63048d06b 100644 --- a/Telegram/SourceFiles/history/history_item.cpp +++ b/Telegram/SourceFiles/history/history_item.cpp @@ -86,8 +86,8 @@ using ItemPreview = HistoryView::ItemPreview; if (!m.hasMatch()) { return text; } - const auto codeStart = m.capturedStart(1); - const auto codeLength = m.capturedLength(1); + const auto codeStart = int(m.capturedStart(1)); + const auto codeLength = int(m.capturedLength(1)); auto i = text.entities.begin(); const auto e = text.entities.end(); while (i != e && i->offset() < codeStart) { diff --git a/Telegram/SourceFiles/history/history_item.h b/Telegram/SourceFiles/history/history_item.h index 3ce4cdcc5e..b267939632 100644 --- a/Telegram/SourceFiles/history/history_item.h +++ b/Telegram/SourceFiles/history/history_item.h @@ -82,7 +82,6 @@ class Element; class Message; class Service; class ServiceMessagePainter; -struct NotificationTextOptions; } // namespace HistoryView class HistoryItem final : public RuntimeComposer { @@ -361,7 +360,10 @@ public: }; [[nodiscard]] QString notificationHeader() const; [[nodiscard]] TextWithEntities notificationText( - NotificationTextOptions options = {}) const; + NotificationTextOptions options) const; + [[nodiscard]] TextWithEntities notificationText() const { + return notificationText({}); + } using ToPreviewOptions = HistoryView::ToPreviewOptions; using ItemPreview = HistoryView::ItemPreview;