Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/telegramdesktop/tdesktop int…
Browse files Browse the repository at this point in the history
…o tdev
  • Loading branch information
xmdnx committed Nov 11, 2023
2 parents 2306ddd + 468d4c5 commit 122ae70
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 38 deletions.
2 changes: 1 addition & 1 deletion Telegram/SourceFiles/boxes/gift_premium_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ void GiftCodePendingBox(

AddTable(box->verticalLayout(), controller, data, true);

const auto footer = box->addRow(
box->addRow(
object_ptr<Ui::FlatLabel>(
box,
tr::lng_gift_link_pending_footer(),
Expand Down
8 changes: 4 additions & 4 deletions Telegram/SourceFiles/core/crash_report_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down
17 changes: 14 additions & 3 deletions Telegram/SourceFiles/history/history_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<HistoryMessageReply>()) {
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) {
Expand Down
36 changes: 21 additions & 15 deletions Telegram/SourceFiles/history/view/history_view_element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 0 additions & 2 deletions Telegram/SourceFiles/info/boosts/info_boosts_inner_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,6 @@ void FillShareLink(

label->clicks(
) | rpl::start_with_next(copyLink, label->lifetime());
const auto copyShareWrap = content->add(
object_ptr<Ui::VerticalLayout>(content));
{
const auto wrap = content->add(
object_ptr<Ui::FixedHeightWidget>(
Expand Down
13 changes: 2 additions & 11 deletions Telegram/SourceFiles/ui/boxes/boost_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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());

Expand Down Expand Up @@ -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<State>();

FillBoostLimit(
BoxShowFinishes(box),
box->verticalLayout(),
Expand Down
4 changes: 2 additions & 2 deletions Telegram/build/setup.iss
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit 122ae70

Please sign in to comment.