Skip to content

Commit

Permalink
Updated to 5.10.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
23rd committed Jan 10, 2025
2 parents c4b0354 + 48fb0f3 commit 7cdc4f6
Show file tree
Hide file tree
Showing 14 changed files with 65 additions and 40 deletions.
1 change: 1 addition & 0 deletions Telegram/Resources/langs/lang.strings
Original file line number Diff line number Diff line change
Expand Up @@ -2129,6 +2129,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_action_giveaway_results_credits#other" = "{count} winners of the giveaway were randomly selected by Telegram and received their prize.";
"lng_action_giveaway_results_credits_some" = "Some winners of the giveaway were randomly selected by Telegram and received their prize.";
"lng_action_giveaway_results_none" = "No winners of the giveaway could be selected.";
"lng_action_boost_apply_me" = "You boosted the group";
"lng_action_boost_apply#one" = "{from} boosted the group";
"lng_action_boost_apply#other" = "{from} boosted the group {count} times";
"lng_action_set_chat_intro" = "{from} added the message below for all empty chats. How?";
Expand Down
2 changes: 1 addition & 1 deletion Telegram/Resources/uwp/AppX/AppxManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
ProcessorArchitecture="ARCHITECTURE"
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
Version="5.10.2.0" />
Version="5.10.3.0" />
<Properties>
<DisplayName>Telegram Desktop</DisplayName>
<PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>
Expand Down
8 changes: 4 additions & 4 deletions Telegram/Resources/winrc/Telegram.rc
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 5,10,2,0
PRODUCTVERSION 5,10,2,0
FILEVERSION 5,10,3,0
PRODUCTVERSION 5,10,3,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -62,10 +62,10 @@ BEGIN
BEGIN
VALUE "CompanyName", ""
VALUE "FileDescription", "Telegram Desktop"
VALUE "FileVersion", "5.10.2.0"
VALUE "FileVersion", "5.10.3.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2025"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "5.10.2.0"
VALUE "ProductVersion", "5.10.3.0"
END
END
BLOCK "VarFileInfo"
Expand Down
8 changes: 4 additions & 4 deletions Telegram/Resources/winrc/Updater.rc
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 5,10,2,0
PRODUCTVERSION 5,10,2,0
FILEVERSION 5,10,3,0
PRODUCTVERSION 5,10,3,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -53,10 +53,10 @@ BEGIN
BEGIN
VALUE "CompanyName", ""
VALUE "FileDescription", "Telegram Desktop Updater"
VALUE "FileVersion", "5.10.2.0"
VALUE "FileVersion", "5.10.3.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2025"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "5.10.2.0"
VALUE "ProductVersion", "5.10.3.0"
END
END
BLOCK "VarFileInfo"
Expand Down
4 changes: 2 additions & 2 deletions Telegram/SourceFiles/core/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ constexpr auto AppId = "{53F49750-6209-4FBF-9CA8-7A333C87D1ED}"_cs;
constexpr auto AppNameOld = "Telegram Win (Unofficial)"_cs;
constexpr auto AppName = "Telegram Desktop"_cs;
constexpr auto AppFile = "Telegram"_cs;
constexpr auto AppVersion = 5010002;
constexpr auto AppVersionStr = "5.10.2";
constexpr auto AppVersion = 5010003;
constexpr auto AppVersionStr = "5.10.3";
constexpr auto AppBetaVersion = false;
constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION;
3 changes: 1 addition & 2 deletions Telegram/SourceFiles/data/data_chat_participant_status.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ SendError RestrictionError(
}
}
if (all
&& channel
&& channel->boostsUnrestrict()
&& !channel->unrestrictedByBoosts()) {
return SendError({
Expand Down Expand Up @@ -410,8 +411,6 @@ void ShowSendErrorToast(
std::shared_ptr<ChatHelpers::Show> show,
not_null<PeerData*> peer,
Data::SendError error) {
Expects(peer->isChannel());

if (!error.boostsToLift) {
show->showToast(*error);
return;
Expand Down
12 changes: 6 additions & 6 deletions Telegram/SourceFiles/dialogs/ui/dialogs_layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -727,11 +727,11 @@ void PaintRow(
}

p.setFont(st::semiboldFont);
const auto paintPeerBadge = [&] {
const auto paintPeerBadge = [&](int rowNameWidth) {
const auto badgeWidth = rowBadge.drawGetWidth(p, {
.peer = from,
.rectForName = rectForName,
.nameWidth = rowName.maxWidth(),
.nameWidth = rowNameWidth,
.outerWidth = context.width,
.verified = (context.active
? &st::dialogsVerifiedIconActive
Expand Down Expand Up @@ -764,9 +764,6 @@ void PaintRow(
| Flag::VerifyCodes
| Flag::HiddenAuthor
| Flag::MyNotes)) {
if (!context.search && (flags & Flag::VerifyCodes)) {
paintPeerBadge();
}
auto text = (flags & Flag::SavedMessages)
? tr::lng_saved_messages(tr::now)
: (flags & Flag::RepliesMessages)
Expand All @@ -777,6 +774,9 @@ void PaintRow(
? tr::lng_my_notes(tr::now)
: tr::lng_hidden_author_messages(tr::now);
const auto textWidth = st::semiboldFont->width(text);
if (!context.search && (flags & Flag::VerifyCodes)) {
paintPeerBadge(textWidth);
}
if (textWidth > rectForName.width()) {
text = st::semiboldFont->elided(text, rectForName.width());
}
Expand All @@ -792,7 +792,7 @@ void PaintRow(
text);
} else if (from) {
if ((history || sublist) && !context.search) {
paintPeerBadge();
paintPeerBadge(rowName.maxWidth());
}
p.setPen(context.active
? st::dialogsNameFgActive
Expand Down
26 changes: 19 additions & 7 deletions Telegram/SourceFiles/history/history_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5335,14 +5335,26 @@ void HistoryItem::setServiceMessageByAction(const MTPmessageAction &action) {
auto prepareBoostApply = [&](const MTPDmessageActionBoostApply &action) {
auto result = PreparedServiceText();
const auto boosts = action.vboosts().v;
const auto isSelf = (_from->id == _from->session().userPeerId());
result.links.push_back(fromLink());
result.text = tr::lng_action_boost_apply(
tr::now,
lt_count,
boosts,
lt_from,
fromLinkText(), // Link 1.
Ui::Text::WithEntities);
result.text = isSelf
? tr::lng_action_boost_apply_me(tr::now, Ui::Text::WithEntities)
: tr::lng_action_boost_apply(
tr::now,
lt_count,
boosts,
lt_from,
fromLinkText(), // Link 1.
Ui::Text::WithEntities);
const auto channel = _history->peer->asChannel();
setCustomServiceLink(std::make_shared<LambdaClickHandler>([=](
ClickContext context) {
const auto my = context.other.value<ClickHandlerContext>();
const auto weak = my.sessionWindow;
if (const auto strong = channel ? weak.get() : nullptr) {
strong->resolveBoostState(channel);
}
}));
return result;
};
auto preparePaymentRefunded = [&](const MTPDmessageActionPaymentRefunded &action) {
Expand Down
23 changes: 15 additions & 8 deletions Telegram/SourceFiles/history/history_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3635,14 +3635,19 @@ void HistoryWidget::historyLoaded() {
}

bool HistoryWidget::clearMaybeSendStart() {
if (!_showAndMaybeSendStart) {
if (!_showAndMaybeSendStart || !_history) {
return false;
} else if (!_history->peer->isFullLoaded()) {
_history->peer->updateFull();
return false;
}
_showAndMaybeSendStart = false;
if (const auto user = _history ? _history->peer->asUser() : nullptr) {
if (const auto info = user->botInfo.get()) {
if (!info->startToken.isEmpty()) {
return true;
if (user->blockStatus() == PeerData::BlockStatus::NotBlocked) {
if (const auto info = user->botInfo.get()) {
if (!info->startToken.isEmpty()) {
return true;
}
}
}
}
Expand Down Expand Up @@ -4011,10 +4016,8 @@ void HistoryWidget::preloadHistoryIfNeeded() {
preloadHistoryByScroll();
checkReplyReturns();
}
if (_history && _history->loadedAtTop() && _history->loadedAtBottom()) {
if (clearMaybeSendStart() && !_history->isDisplayedEmpty()) {
sendBotStartCommand();
}
if (clearMaybeSendStart() && !_history->isDisplayedEmpty()) {
sendBotStartCommand();
}
}

Expand Down Expand Up @@ -8368,6 +8371,10 @@ void HistoryWidget::fullInfoUpdated() {

handlePeerUpdate();
checkSuggestToGigagroup();

if (clearMaybeSendStart() && !_history->isDisplayedEmpty()) {
sendBotStartCommand();
}
}
if (updateCmdStartShown()) {
refresh = true;
Expand Down
2 changes: 1 addition & 1 deletion Telegram/SourceFiles/history/view/history_view_message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2975,7 +2975,7 @@ bool Message::getStateText(
} else if (const auto botTop = Get<FakeBotAboutTop>()) {
trect.setY(trect.y() + botTop->height);
}
const auto item = data();
const auto item = this->textItem();
if (base::in_range(point.y(), trect.y(), trect.y() + trect.height())) {
*outResult = TextState(item, text().getState(
point - trect.topLeft(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ void InnerWidget::setupDuration() {
return (value < 12)
? tr::lng_months_tiny(tr::now, lt_count, value)
: (value < 999)
? tr::lng_years_tiny(tr::now, lt_count, value)
? tr::lng_years_tiny(tr::now, lt_count, value / 12)
: QString::fromUtf8("\xE2\x88\x9E"); // utf-8 infinity
};
_container->add(
Expand Down
2 changes: 2 additions & 0 deletions Telegram/SourceFiles/window/window_peer_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1401,6 +1401,7 @@ void Filler::fillChatsListActions() {
}
addManageChat();
addNewMembers();
addBoostChat();
addVideoChat();
_addAction(PeerMenuCallback::Args{ .isSeparator = true });
addReport();
Expand Down Expand Up @@ -1510,6 +1511,7 @@ void Filler::fillRepliesActions() {
addInfo();
addManageTopic();
}
addBoostChat();
addCreatePoll();
addToggleTopicClosed();
addDeleteTopic();
Expand Down
8 changes: 4 additions & 4 deletions Telegram/build/version
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
AppVersion 5010002
AppVersion 5010003
AppVersionStrMajor 5.10
AppVersionStrSmall 5.10.2
AppVersionStr 5.10.2
AppVersionStrSmall 5.10.3
AppVersionStr 5.10.3
BetaChannel 0
AlphaVersion 0
AppVersionOriginal 5.10.2
AppVersionOriginal 5.10.3
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
5.10.3 (09.01.25)

- Fix a crash in legacy group opening.

5.10.2 (07.01.25)

- Fix double verification badge in profiles.
Expand Down

0 comments on commit 7cdc4f6

Please sign in to comment.