Compare commits

..

6 Commits

Author SHA1 Message Date
John Preston
b1e707c346 Version 6.2.2.
- Fix layer.
2025-10-10 23:12:58 +04:00
John Preston
36b7b3a7cd Version 6.2.1.
- Fix sending gifts.
- Fix possible crash on Linux.
2025-10-10 23:12:22 +04:00
John Preston
d44349d612 Fix possible crash on Linux. 2025-10-10 21:58:35 +04:00
23rd
53919be913 Slightly improved mouse processing for gift buttons. 2025-10-10 21:58:29 +04:00
23rd
8dd7d04fff Removed duplicated callback on press on gift in gifts list section. 2025-10-10 21:58:29 +04:00
23rd
384f6d9a31 Added logging of api updates when deleted message is unknown. 2025-10-10 21:58:29 +04:00
13 changed files with 81 additions and 56 deletions

View File

@@ -10,7 +10,7 @@
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
ProcessorArchitecture="ARCHITECTURE"
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
Version="6.2.0.0" />
Version="6.2.2.0" />
<Properties>
<DisplayName>Telegram Desktop</DisplayName>
<PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>

View File

@@ -44,8 +44,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 6,2,0,0
PRODUCTVERSION 6,2,0,0
FILEVERSION 6,2,2,0
PRODUCTVERSION 6,2,2,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -62,10 +62,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Telegram FZ-LLC"
VALUE "FileDescription", "Telegram Desktop"
VALUE "FileVersion", "6.2.0.0"
VALUE "FileVersion", "6.2.2.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2025"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "6.2.0.0"
VALUE "ProductVersion", "6.2.2.0"
END
END
BLOCK "VarFileInfo"

View File

@@ -35,8 +35,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 6,2,0,0
PRODUCTVERSION 6,2,0,0
FILEVERSION 6,2,2,0
PRODUCTVERSION 6,2,2,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -53,10 +53,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Telegram FZ-LLC"
VALUE "FileDescription", "Telegram Desktop Updater"
VALUE "FileVersion", "6.2.0.0"
VALUE "FileVersion", "6.2.2.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2025"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "6.2.0.0"
VALUE "ProductVersion", "6.2.2.0"
END
END
BLOCK "VarFileInfo"

View File

@@ -1627,6 +1627,17 @@ void Updates::feedUpdate(const MTPUpdate &update) {
auto &d = update.c_updateNewChannelMessage();
auto channel = session().data().channelLoaded(peerToChannel(PeerFromMessage(d.vmessage())));
const auto isDataLoaded = AllDataLoadedForMessage(&session(), d.vmessage());
{
// Todo delete.
const auto messageId = IdFromMessage(d.vmessage());
if (const auto history = channel ? session().data().historyLoaded(channel) : nullptr) {
if (history->isUnknownMessageDeleted(messageId)) {
LOG(("Unknown message deleted detected for channel %1, message %2")
.arg(channel->id.value & PeerId::kChatTypeMask)
.arg(messageId.bare));
}
}
}
if (!requestingDifference() && (!channel || isDataLoaded != DataIsLoadedResult::Ok)) {
MTP_LOG(0, ("getDifference "
"{ good - after not all data loaded in updateNewChannelMessage }%1"

View File

@@ -22,7 +22,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 = 6002000;
constexpr auto AppVersionStr = "6.2";
constexpr auto AppVersion = 6002002;
constexpr auto AppVersionStr = "6.2.2";
constexpr auto AppBetaVersion = false;
constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION;

View File

@@ -320,11 +320,7 @@ rpl::producer<int> TopBarSuggestionContent::desiredHeightValue() const {
const auto desiredHeight = lastTop
+ (lastLines * _contentTextSt.font->height)
+ bottomPadding;
const auto minHeight = desiredHeight;
return std::clamp(
desiredHeight,
minHeight,
st::sponsoredMessageBarMaxHeight);
return std::min(desiredHeight, st::sponsoredMessageBarMaxHeight);
});
}

View File

@@ -2976,11 +2976,19 @@ bool History::shouldBeInChatList() const {
}
void History::unknownMessageDeleted(MsgId messageId) {
LOG(("History::unknownMessageDeleted. Peer ID: %1, Message ID: %2.")
.arg(peer->id.value & PeerId::kChatTypeMask)
.arg(messageId.bare));
_unknownDeletedMessages[messageId] = base::unixtime::now();
if (_inboxReadBefore && messageId >= *_inboxReadBefore) {
owner().histories().requestDialogEntry(this);
}
}
bool History::isUnknownMessageDeleted(MsgId messageId) const {
return _unknownDeletedMessages.contains(messageId);
}
bool History::isServerSideUnread(not_null<const HistoryItem*> item) const {
Expects(item->isRegular());

View File

@@ -249,6 +249,7 @@ public:
[[nodiscard]] bool lastMessageKnown() const;
[[nodiscard]] bool lastServerMessageKnown() const;
void unknownMessageDeleted(MsgId messageId);
[[nodiscard]] bool isUnknownMessageDeleted(MsgId messageId) const;
void applyDialogTopMessage(MsgId topMessageId);
void applyDialog(Data::Folder *requestFolder, const MTPDdialog &data);
void applyPinnedUpdate(const MTPDupdateDialogPinned &data);
@@ -668,6 +669,8 @@ private:
base::flat_map<Data::DraftKey, int> _savingCloudDraftRequests;
base::flat_map<Data::DraftKey, Data::ForwardDraft> _forwardDrafts;
base::flat_map<MsgId, TimeId> _unknownDeletedMessages;
QString _topPromotedMessage;
QString _topPromotedType;

View File

@@ -538,27 +538,45 @@ void GiftButton::contextMenuEvent(QContextMenuEvent *e) {
}
void GiftButton::mousePressEvent(QMouseEvent *e) {
_mouseEvents.fire_copy(e);
if (e->isAccepted()) {
return;
if (_mouseEventsAreListening) {
if (e->button() != Qt::LeftButton) {
return;
}
_mouseEvents.fire_copy(e);
} else {
AbstractButton::mousePressEvent(e);
}
AbstractButton::mousePressEvent(e);
}
void GiftButton::mouseMoveEvent(QMouseEvent *e) {
_mouseEvents.fire_copy(e);
if (e->isAccepted()) {
return;
if (_mouseEventsAreListening) {
if (e->button() != Qt::LeftButton) {
return;
}
_mouseEvents.fire_copy(e);
} else {
AbstractButton::mouseMoveEvent(e);
}
AbstractButton::mouseMoveEvent(e);
}
void GiftButton::mouseReleaseEvent(QMouseEvent *e) {
_mouseEvents.fire_copy(e);
if (e->isAccepted()) {
return;
if (_mouseEventsAreListening) {
if (e->button() != Qt::LeftButton) {
return;
}
_mouseEvents.fire_copy(e);
} else {
AbstractButton::mouseReleaseEvent(e);
}
AbstractButton::mouseReleaseEvent(e);
}
rpl::producer<QPoint> GiftButton::contextMenuRequests() const {
return _contextMenuRequests.events();
}
rpl::producer<QMouseEvent*> GiftButton::mouseEvents() {
_mouseEventsAreListening = true;
return _mouseEvents.events();
}
void GiftButton::cacheUniqueBackground(

View File

@@ -174,13 +174,8 @@ public:
GiftSelectionMode selectionMode = GiftSelectionMode::Border,
anim::type animated = anim::type::normal);
[[nodiscard]] rpl::producer<QPoint> contextMenuRequests() const {
return _contextMenuRequests.events();
}
[[nodiscard]] rpl::producer<QMouseEvent*> mouseEvents() const {
return _mouseEvents.events();
}
[[nodiscard]] rpl::producer<QPoint> contextMenuRequests() const;
[[nodiscard]] rpl::producer<QMouseEvent*> mouseEvents();
private:
void paintEvent(QPaintEvent *e) override;
@@ -228,6 +223,8 @@ private:
bool _selected : 1 = false;
bool _locked : 1 = false;
bool _mouseEventsAreListening = false;
base::Timer _lockedTimer;
TimeId _lockedUntilDate = 0;

View File

@@ -747,21 +747,12 @@ std::unique_ptr<GiftButton> InnerWidget::createGiftButton() {
case QEvent::MouseButtonPress:
raw->raise();
mousePressEvent(e);
if (e->isAccepted()) {
return;
}
break;
case QEvent::MouseMove:
mouseMoveEvent(e);
if (e->isAccepted()) {
return;
}
break;
case QEvent::MouseButtonRelease:
mouseReleaseEvent(e);
if (e->isAccepted()) {
return;
}
break;
default:
break;
@@ -840,9 +831,6 @@ void InnerWidget::validateButtons() {
}
}
auto &view = views.back();
const auto callback = _addingToCollectionId
? Fn<void()>([=] { showGift(index); })
: nullptr;
view.index = index;
view.manageId = manageId;
view.giftId = giftId;
@@ -853,9 +841,6 @@ void InnerWidget::validateButtons() {
anim::type::instant);
}
view.button->setDescriptor(descriptor, _mode);
if (callback) {
view.button->setClickedCallback(callback);
}
return true;
};
for (auto j = fromRow; j != tillRow; ++j) {
@@ -921,8 +906,6 @@ void InnerWidget::validateButtons() {
_inCollection.contains(entry.gift.manageId),
GiftSelectionMode::Check,
anim::type::instant);
const auto callback = [=] { showGift(_dragging.index); };
_draggedView->button->setClickedCallback(callback);
}
_draggedView->button->show();
} else {

View File

@@ -1,7 +1,7 @@
AppVersion 6002000
AppVersion 6002002
AppVersionStrMajor 6.2
AppVersionStrSmall 6.2
AppVersionStr 6.2.0
AppVersionStrSmall 6.2.2
AppVersionStr 6.2.2
BetaChannel 0
AlphaVersion 0
AppVersionOriginal 6.2
AppVersionOriginal 6.2.2

View File

@@ -1,3 +1,12 @@
6.2.2 (10.10.25)
- Fix layer.
6.2.1 (10.10.25)
- Fix sending gifts.
- Fix possible crash on Linux.
6.2 (10.10.25)
- Comments and reactions in group calls.