diff --git a/Telegram/SourceFiles/boxes/gift_premium_box.cpp b/Telegram/SourceFiles/boxes/gift_premium_box.cpp index 8107a09e896895..4b3050935d4035 100644 --- a/Telegram/SourceFiles/boxes/gift_premium_box.cpp +++ b/Telegram/SourceFiles/boxes/gift_premium_box.cpp @@ -692,7 +692,7 @@ void GiftCodePendingBox( AddTable(box->verticalLayout(), controller, data, true); - const auto footer = box->addRow( + box->addRow( object_ptr( box, tr::lng_gift_link_pending_footer(), diff --git a/Telegram/SourceFiles/core/crash_report_window.cpp b/Telegram/SourceFiles/core/crash_report_window.cpp index c3e511914b53bc..2311994502035b 100644 --- a/Telegram/SourceFiles/core/crash_report_window.cpp +++ b/Telegram/SourceFiles/core/crash_report_window.cpp @@ -346,9 +346,9 @@ LastCrashedWindow::LastCrashedWindow( [=] { networkSettings(); }); if (_sendingState == SendingNoReport) { - _label.setText(u"Last time Telegram Desktop was not closed properly."_q); + _label.setText(u"Last time rabbitGram Desktop was not closed properly."_q); } else { - _label.setText(u"Last time Telegram Desktop crashed :("_q); + _label.setText(u"Last time rabbitGram Desktop crashed :("_q); } if (_updaterData) { @@ -439,9 +439,9 @@ LastCrashedWindow::LastCrashedWindow( }); _saveReport.setText(u"SAVE TO FILE"_q); connect(&_saveReport, &QPushButton::clicked, [=] { saveReport(); }); - _getApp.setText(u"GET THE LATEST OFFICIAL VERSION OF TELEGRAM DESKTOP"_q); + _getApp.setText(u"GET THE LATEST VERSION OF RABBITGRAM DESKTOP"_q); connect(&_getApp, &QPushButton::clicked, [=] { - QDesktopServices::openUrl(u"https://desktop.telegram.org"_q); + QDesktopServices::openUrl(u"https://github.com/rabbitgramdesktop/rabbitgramdesktop/releases"_q); }); _send.setText(u"SEND CRASH REPORT"_q); diff --git a/Telegram/SourceFiles/history/history_item.cpp b/Telegram/SourceFiles/history/history_item.cpp index 55de1710f48fb5..8653528d860151 100644 --- a/Telegram/SourceFiles/history/history_item.cpp +++ b/Telegram/SourceFiles/history/history_item.cpp @@ -2904,11 +2904,22 @@ FullStoryId HistoryItem::replyToStory() const { } FullReplyTo HistoryItem::replyTo() const { - return { - .messageId = replyToFullId(), - .storyId = replyToStory(), + auto result = FullReplyTo{ .topicRootId = topicRootId(), }; + if (const auto reply = Get()) { + const auto &fields = reply->fields(); + const auto peer = fields.externalPeerId; + const auto replyToPeer = peer ? peer : _history->peer->id; + if (const auto id = fields.messageId) { + result.messageId = { replyToPeer, id }; + result.quote = fields.quote; + } + if (const auto id = fields.storyId) { + result.storyId = { replyToPeer, id }; + } + } + return result; } void HistoryItem::setText(const TextWithEntities &textWithEntities) { diff --git a/Telegram/SourceFiles/history/view/history_view_element.cpp b/Telegram/SourceFiles/history/view/history_view_element.cpp index c6dda063b6301d..cf593419b5eb9b 100644 --- a/Telegram/SourceFiles/history/view/history_view_element.cpp +++ b/Telegram/SourceFiles/history/view/history_view_element.cpp @@ -1673,21 +1673,27 @@ TextSelection Element::FindSelectionFromQuote( } offset = i + 1; } - //for (const auto &modification : text.modifications()) { - // if (modification.position >= selection.to) { - // break; - // } else if (modification.position <= selection.from) { - // modified.from += modification.skipped; - // if (modification.added - // && modification.position < selection.from) { - // --modified.from; - // } - // } - // modified.to += modification.skipped; - // if (modification.added && modified.to > modified.from) { - // --modified.to; - // } - //} + for (const auto &modification : text.modifications()) { + if (modification.position >= result.to) { + break; + } + if (modification.added) { + ++result.to; + } + const auto shiftTo = std::min( + int(modification.skipped), + result.to - modification.position); + result.to -= shiftTo; + if (modification.position <= result.from) { + if (modification.added) { + ++result.from; + } + const auto shiftFrom = std::min( + int(modification.skipped), + result.from - modification.position); + result.from -= shiftFrom; + } + } return result; } diff --git a/Telegram/SourceFiles/info/boosts/info_boosts_inner_widget.cpp b/Telegram/SourceFiles/info/boosts/info_boosts_inner_widget.cpp index 84b7cad5249788..34e0d926fffa71 100644 --- a/Telegram/SourceFiles/info/boosts/info_boosts_inner_widget.cpp +++ b/Telegram/SourceFiles/info/boosts/info_boosts_inner_widget.cpp @@ -184,8 +184,6 @@ void FillShareLink( label->clicks( ) | rpl::start_with_next(copyLink, label->lifetime()); - const auto copyShareWrap = content->add( - object_ptr(content)); { const auto wrap = content->add( object_ptr( diff --git a/Telegram/SourceFiles/ui/boxes/boost_box.cpp b/Telegram/SourceFiles/ui/boxes/boost_box.cpp index 633cb3e1fa6929..0be48632caa0eb 100644 --- a/Telegram/SourceFiles/ui/boxes/boost_box.cpp +++ b/Telegram/SourceFiles/ui/boxes/boost_box.cpp @@ -24,7 +24,7 @@ For license and copyright information please follow this link: namespace Ui { namespace { -[[nodiscrd]] BoostCounters AdjustByReached(BoostCounters data) { +[[nodiscard]] BoostCounters AdjustByReached(BoostCounters data) { const auto exact = (data.boosts == data.thisLevelBoosts); const auto reached = !data.nextLevelBoosts || (exact && data.mine > 0); if (reached) { @@ -98,11 +98,7 @@ namespace { auto hq = PainterHighQualityEnabler(p); const auto radius = std::min(badge->width(), badge->height()) / 2; p.setPen(Qt::NoPen); - auto brush = QLinearGradient( - QPointF(badge->width(), badge->height()), - QPointF()); - brush.setStops(Ui::Premium::ButtonGradientStops()); - p.setBrush(brush); + p.setBrush(st::premiumButtonBg2); p.drawRoundedRect(badge->rect(), radius, radius); }, badge->lifetime()); @@ -465,11 +461,6 @@ void AskBoostBox( box->setWidth(st::boxWideWidth); box->setStyle(st::boostBox); - struct State { - bool submitted = false; - }; - const auto state = box->lifetime().make_state(); - FillBoostLimit( BoxShowFinishes(box), box->verticalLayout(), diff --git a/Telegram/build/setup.iss b/Telegram/build/setup.iss index b88c93cee56156..e1b7b44c3d2b82 100644 --- a/Telegram/build/setup.iss +++ b/Telegram/build/setup.iss @@ -1,14 +1,14 @@ #define MyAppShortName "rabbitGram" #define MyAppName "rabbitGram Desktop" #define MyAppPublisher "xmdnx" -#define MyAppVersion "4.11.5" +#define MyAppVersion "4.11.6" #define MyAppURL "https://t.me/rabbitGramDesktop" #define ReleasePath "C:\Users\xmdnusr\source\repos\rabbitgramdesktop\out\Release" #define MyAppExeName "rabbitGram.exe" #define MyAppId "4356CE01-4137-4C55-9F8B-FB4EEBB6EC0C" #define CurrentYear GetDateTimeString('yyyy','','') #define MyBuildTarget "win64" -#define MyAppVersionFull "4.11.5-09112023" +#define MyAppVersionFull "4.11.6-10112023" [Setup] ; NOTE: The value of AppId uniquely identifies this application.