commit 551cc1ea1008244badb1c22550600364df6b838e
Author: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Thu Mar 26 13:23:53 2020 +0100
Backported upstream patches with different fixes.
telegram-desktop-6c46194.patch | 21 +++++++++
telegram-desktop-d2291f5.patch | 99 ++++++++++++++++++++++++++++++++++++++++++
telegram-desktop-ea854e5.patch | 28 ++++++++++++
telegram-desktop.spec | 13 +++++-
4 files changed, 159 insertions(+), 2 deletions(-)
---
diff --git a/telegram-desktop-6c46194.patch b/telegram-desktop-6c46194.patch
new file mode 100644
index 0000000..d3c0b7f
--- /dev/null
+++ b/telegram-desktop-6c46194.patch
@@ -0,0 +1,21 @@
+From 6c46194009a0bf26c1f383060a9d14378efa4ded Mon Sep 17 00:00:00 2001
+From: Aleksey Kiporskiy <kiporscky(a)live.ru>
+Date: Tue, 24 Mar 2020 13:58:39 +0500
+Subject: [PATCH] bugfix: show chat description
+
+---
+ Telegram/SourceFiles/data/data_chat.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Telegram/SourceFiles/data/data_chat.cpp
b/Telegram/SourceFiles/data/data_chat.cpp
+index 9e7870b8ea..d3dfbc9e9c 100644
+--- a/Telegram/SourceFiles/data/data_chat.cpp
++++ b/Telegram/SourceFiles/data/data_chat.cpp
+@@ -350,6 +350,7 @@ void ApplyChatUpdate(not_null<ChatData*> chat, const
MTPDchatFull &update) {
+ }
+ chat->checkFolder(update.vfolder_id().value_or_empty());
+ chat->fullUpdated();
++ chat->setAbout(qs(update.vabout()));
+
+ chat->session().api().applyNotifySettings(
+ MTP_inputNotifyPeer(chat->input),
diff --git a/telegram-desktop-d2291f5.patch b/telegram-desktop-d2291f5.patch
new file mode 100644
index 0000000..689e01a
--- /dev/null
+++ b/telegram-desktop-d2291f5.patch
@@ -0,0 +1,99 @@
+From d2291f5b17e0c169083a34e51053a99546207ec8 Mon Sep 17 00:00:00 2001
+From: Ilya Fedin <fedin-ilja2010(a)ya.ru>
+Date: Tue, 17 Mar 2020 23:13:11 +0400
+Subject: [PATCH] Fix panel icon forcing
+
+---
+ .../platform/linux/main_window_linux.cpp | 20 +++++++++++--------
+ .../platform/linux/main_window_linux.h | 2 +-
+ 2 files changed, 13 insertions(+), 9 deletions(-)
+
+diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp
b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp
+index 347395ab38..3d30ef755c 100644
+--- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp
++++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp
+@@ -78,7 +78,8 @@ QString GetTrayIconName(int counter, bool muted) {
+ const auto iconName = GetIconName();
+ const auto panelIconName = GetPanelIconName(counter, muted);
+
+- if (QIcon::hasThemeIcon(panelIconName)) {
++ if (QIcon::hasThemeIcon(panelIconName)
++ || qEnvironmentVariableIsSet(kForcePanelIcon.utf8())) {
+ return panelIconName;
+ } else if (QIcon::hasThemeIcon(iconName)) {
+ return iconName;
+@@ -158,7 +159,7 @@ QIcon TrayIconGen(int counter, bool muted) {
+ || iconThemeName != TrayIconThemeName
+ || iconName != TrayIconName) {
+ if (!iconName.isEmpty()) {
+- if(systemIcon.isNull()) {
++ if (systemIcon.isNull()) {
+ systemIcon = QIcon::fromTheme(iconName);
+ }
+
+@@ -467,11 +468,12 @@ void MainWindow::psTrayMenuUpdated() {
+ }
+
+ #ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION
+-void MainWindow::setSNITrayIcon(int counter, bool muted, bool firstShow) {
++void MainWindow::setSNITrayIcon(int counter, bool muted) {
+ const auto iconName = GetTrayIconName(counter, muted);
+
+ if (qEnvironmentVariableIsSet(kDisableTrayCounter.utf8())
+- && ((!iconName.isEmpty() && !InSnap())
++ && !iconName.isEmpty()
++ && (!InSnap()
+ || qEnvironmentVariableIsSet(kForcePanelIcon.utf8()))) {
+ if (_sniTrayIcon->iconName() == iconName) {
+ return;
+@@ -480,7 +482,8 @@ void MainWindow::setSNITrayIcon(int counter, bool muted, bool
firstShow) {
+ _sniTrayIcon->setIconByName(iconName);
+ _sniTrayIcon->setToolTipIconByName(iconName);
+ } else if (IsIndicatorApplication()) {
+- if(!IsIconRegenerationNeeded(counter, muted) && !firstShow) {
++ if (!IsIconRegenerationNeeded(counter, muted)
++ && !_sniTrayIcon->iconName().isEmpty()) {
+ return;
+ }
+
+@@ -492,7 +495,8 @@ void MainWindow::setSNITrayIcon(int counter, bool muted, bool
firstShow) {
+ _sniTrayIcon->setIconByName(_trayIconFile->fileName());
+ }
+ } else {
+- if(!IsIconRegenerationNeeded(counter, muted) && !firstShow) {
++ if (!IsIconRegenerationNeeded(counter, muted)
++ && !_sniTrayIcon->iconPixmap().isEmpty()) {
+ return;
+ }
+
+@@ -554,7 +558,7 @@ void MainWindow::onSNIOwnerChanged(
+
+ cSetSupportTray(trayAvailable);
+
+- if(cSupportTray()) {
++ if (cSupportTray()) {
+ psSetupTrayIcon();
+ } else {
+ LOG(("System tray is not available."));
+@@ -575,7 +579,7 @@ void MainWindow::psSetupTrayIcon() {
+ this);
+
+ _sniTrayIcon->setTitle(AppName.utf16());
+- setSNITrayIcon(counter, muted, true);
++ setSNITrayIcon(counter, muted);
+
+ attachToSNITrayIcon();
+ }
+diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.h
b/Telegram/SourceFiles/platform/linux/main_window_linux.h
+index 8602c53806..43ab722845 100644
+--- a/Telegram/SourceFiles/platform/linux/main_window_linux.h
++++ b/Telegram/SourceFiles/platform/linux/main_window_linux.h
+@@ -123,7 +123,7 @@ public slots:
+ QAction *psMonospace = nullptr;
+ QAction *psClearFormat = nullptr;
+
+- void setSNITrayIcon(int counter, bool muted, bool firstShow = false);
++ void setSNITrayIcon(int counter, bool muted);
+ void attachToSNITrayIcon();
+ #endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION
+
diff --git a/telegram-desktop-ea854e5.patch b/telegram-desktop-ea854e5.patch
new file mode 100644
index 0000000..829c195
--- /dev/null
+++ b/telegram-desktop-ea854e5.patch
@@ -0,0 +1,28 @@
+From ea854e5be3c89157c282f7e224bee2e14791208a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=D0=9A=D0=B8=D0=BF=D0=BE=D1=80=D1=81=D0=BA=D0=B8=D0=B9=20?=
+ =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
+ <kiporskiy_ay(a)technology45.ru>
+Date: Fri, 20 Mar 2020 10:02:36 +0500
+Subject: [PATCH] bugfix: incorrect erase element
+
+---
+ Telegram/SourceFiles/mtproto/session_private.cpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/Telegram/SourceFiles/mtproto/session_private.cpp
b/Telegram/SourceFiles/mtproto/session_private.cpp
+index e35a4959d5..808af4543e 100644
+--- a/Telegram/SourceFiles/mtproto/session_private.cpp
++++ b/Telegram/SourceFiles/mtproto/session_private.cpp
+@@ -2007,9 +2007,10 @@ void SessionPrivate::requestsAcked(const QVector<MTPlong>
&ids, bool byResponse)
+ } else {
+ DEBUG_LOG(("Message Info: acked msgId %1 that was prepared to resend,
requestId %2").arg(msgId).arg(requestId));
+ }
+- toSend.erase(j);
+-
++
+ _ackedIds.emplace(msgId, j->second->requestId);
++
++ toSend.erase(j);
+ continue;
+ }
+ DEBUG_LOG(("Message Info: msgId %1 was not found in recent resent
either").arg(msgId));
diff --git a/telegram-desktop.spec b/telegram-desktop.spec
index a01646e..3b46040 100644
--- a/telegram-desktop.spec
+++ b/telegram-desktop.spec
@@ -42,8 +42,17 @@ ExclusiveArch: x86_64
# Source files...
Source0: %{url}/releases/download/v%{version}/%{appname}-%{version}%{tarsuffix}.tar.gz
+#
https://github.com/telegramdesktop/tdesktop/commit/d2291f5b17e0c169083a34...
+Patch100: %{name}-d2291f5.patch
+
+#
https://github.com/telegramdesktop/tdesktop/commit/ea854e5be3c89157c282f7...
+Patch101: %{name}-ea854e5.patch
+
+#
https://github.com/telegramdesktop/tdesktop/commit/6c46194009a0bf26c1f383...
+Patch102: %{name}-6c46194.patch
+
#
https://github.com/telegramdesktop/tdesktop/commit/13e8b60d6c396b128cfd73...
-Patch100: %{name}-13e8b60.patch
+Patch103: %{name}-13e8b60.patch
# Telegram Desktop require exact version of Qt due to Qt private API usage.
%{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}}
@@ -209,7 +218,7 @@ desktop-file-validate
%{buildroot}%{_datadir}/applications/%{launcher}.desktop
%changelog
* Thu Mar 26 2020 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.9.21-4
-- Backported upstream patch with tray icon fix.
+- Backported upstream patches with different fixes.
* Mon Mar 23 2020 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.9.21-3
- Disabled aarch64 and ppc64le again due to not enough RAM on builders.