Skip to content

Commit

Permalink
telegram-desktop: update to 5.7.1
Browse files Browse the repository at this point in the history
Signed-off-by: Kaiyang Wu <origincode@aosc.io>
  • Loading branch information
OriginCode committed Nov 2, 2024
1 parent 37309cb commit 220bc45
Show file tree
Hide file tree
Showing 11 changed files with 84 additions and 102 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
From 0540cf453f1cb10646aa3d661a564578c819e166 Mon Sep 17 00:00:00 2001
From 9f4c836ccd4962dd7f09ab64f024d359a702dd48 Mon Sep 17 00:00:00 2001
From: Mingcong Bai <jeffbai@aosc.io>
Date: Tue, 9 Apr 2024 16:36:00 +0800
Subject: [PATCH 1/6] fix(window.style): set default window width to 360px
Subject: [PATCH 1/8] fix(window.style): set default window width to 360px

This allows the Telegram window to scale properly on the PinePhone.
---
Telegram/SourceFiles/window/window.style | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Telegram/SourceFiles/window/window.style b/Telegram/SourceFiles/window/window.style
index 37654c99..c6d2d676 100644
index 32e233a0..308eadf9 100644
--- a/Telegram/SourceFiles/window/window.style
+++ b/Telegram/SourceFiles/window/window.style
@@ -10,7 +10,7 @@ using "ui/widgets/widgets.style";
Expand All @@ -31,5 +31,5 @@ index 37654c99..c6d2d676 100644
columnMaximalWidthThird: 392px;

--
2.46.0
2.47.0

Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
From c0cb72768f2c100c1a81d51396fb471cac9e5e08 Mon Sep 17 00:00:00 2001
From 58b565d712fe52d08207057d382937d3fa34afd0 Mon Sep 17 00:00:00 2001
From: Mingcong Bai <jeffbai@aosc.io>
Date: Tue, 9 Apr 2024 17:43:49 +0800
Subject: [PATCH 2/6] fix(core_settings.h): use system window decoration by
Subject: [PATCH 2/8] fix(core_settings.h): use system window decoration by
default

---
Telegram/SourceFiles/core/core_settings.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Telegram/SourceFiles/core/core_settings.h b/Telegram/SourceFiles/core/core_settings.h
index 06f7475e..6c1ba990 100644
index 3838463f..87210991 100644
--- a/Telegram/SourceFiles/core/core_settings.h
+++ b/Telegram/SourceFiles/core/core_settings.h
@@ -1005,7 +1005,7 @@ private:
@@ -1030,7 +1030,7 @@ private:
rpl::variable<float64> _dialogsNoChatWidthRatio; // per-window
rpl::variable<int> _thirdColumnWidth = kDefaultThirdColumnWidth; // p-w
bool _notifyFromAll = true;
Expand All @@ -22,5 +22,5 @@ index 06f7475e..6c1ba990 100644
rpl::variable<bool> _systemDarkModeEnabled = false;
rpl::variable<WindowTitleContent> _windowTitleContent;
--
2.46.0
2.47.0

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 6989404582c4d940393dd906ec28097322edd0bd Mon Sep 17 00:00:00 2001
From 76aa32955a51bb2b4abfaf57c7b91b0b7665e93a Mon Sep 17 00:00:00 2001
From: Mingcong Bai <jeffbai@aosc.io>
Date: Tue, 9 Apr 2024 22:02:32 +0800
Subject: [PATCH 3/6] fix(ui): fix build with Qt 5
Subject: [PATCH 3/8] fix(ui): fix build with Qt 5

Co-authored-by: Henry Chen <chenx97@aosc.io>
---
Expand All @@ -12,10 +12,10 @@ Co-authored-by: Henry Chen <chenx97@aosc.io>
4 files changed, 8 insertions(+)

diff --git a/Telegram/lib_ui/ui/text/text_entity.cpp b/Telegram/lib_ui/ui/text/text_entity.cpp
index 2e0fc109..2e766088 100644
index 8c1e7932..a4d9872a 100644
--- a/Telegram/lib_ui/ui/text/text_entity.cpp
+++ b/Telegram/lib_ui/ui/text/text_entity.cpp
@@ -2404,6 +2404,8 @@ EntityInText::EntityInText(
@@ -2413,6 +2413,8 @@ EntityInText::EntityInText(
, _data(data) {
}

Expand All @@ -25,7 +25,7 @@ index 2e0fc109..2e766088 100644
const EntitiesInText &entities,
int textLength) {
diff --git a/Telegram/lib_ui/ui/text/text_entity.h b/Telegram/lib_ui/ui/text/text_entity.h
index f6ba110c..0961743e 100644
index e5b7a690..80dda845 100644
--- a/Telegram/lib_ui/ui/text/text_entity.h
+++ b/Telegram/lib_ui/ui/text/text_entity.h
@@ -71,6 +71,8 @@ public:
Expand All @@ -38,7 +38,7 @@ index f6ba110c..0961743e 100644
return _type;
}
diff --git a/Telegram/lib_webview/CMakeLists.txt b/Telegram/lib_webview/CMakeLists.txt
index 1bd7385f..98d623aa 100644
index f4e0bb84..eeed27c7 100644
--- a/Telegram/lib_webview/CMakeLists.txt
+++ b/Telegram/lib_webview/CMakeLists.txt
@@ -7,6 +7,7 @@
Expand All @@ -50,23 +50,23 @@ index 1bd7385f..98d623aa 100644
get_filename_component(src_loc . REALPATH)

diff --git a/Telegram/lib_webview/webview/platform/linux/webview_linux_compositor.cpp b/Telegram/lib_webview/webview/platform/linux/webview_linux_compositor.cpp
index 0e2ee879..99a54ede 100644
index 24274c37..a57c4fab 100644
--- a/Telegram/lib_webview/webview/platform/linux/webview_linux_compositor.cpp
+++ b/Telegram/lib_webview/webview/platform/linux/webview_linux_compositor.cpp
@@ -53,6 +53,7 @@ private:
@@ -54,6 +54,7 @@ private:
};

class Compositor::Output : public QWaylandQuickOutput {
+ Q_OBJECT
public:
Output(Compositor *compositor, QObject *parent = nullptr)
: _xdg(this, &compositor->_private->xdgOutput) {
@@ -302,3 +303,5 @@ void Compositor::setWidget(QQuickWidget *widget) {
}
@@ -304,3 +305,5 @@ void Compositor::setWidget(QQuickWidget *widget) {

} // namespace Webview
#endif // DESKTOP_APP_WEBVIEW_WAYLAND_COMPOSITOR
+
+#include "webview_linux_compositor.moc"
--
2.46.0
2.47.0

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From bbe428aff34d9b57840cfc50e9232e751c98ffa5 Mon Sep 17 00:00:00 2001
From d0cf2033ff967e569f783ee89ffed3cd554e2b07 Mon Sep 17 00:00:00 2001
From: Mingcong Bai <jeffbai@aosc.io>
Date: Tue, 9 Apr 2024 22:04:57 +0800
Subject: [PATCH 4/6] fix(core/launcher.cpp): revert to old HiDPI handling
Subject: [PATCH 4/8] fix(core/launcher.cpp): revert to old HiDPI handling
behaviour

The current implementation makes icons blurry in Qt 5 builds, whilst
Expand All @@ -28,5 +28,5 @@ index 0b6afb7a..f38dd544 100644

if (OptionFractionalScalingEnabled.value()) {
--
2.46.0
2.47.0

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
From 775accdb5f21db7991269abdfe88e9da8b49689e Mon Sep 17 00:00:00 2001
From 541b0de4b087631a8a6e7dce0371f133dc405e4f Mon Sep 17 00:00:00 2001
From: Jiangjin Wang <kaymw@aosc.io>
Date: Mon, 6 May 2024 00:06:32 -0700
Subject: [PATCH 5/6] fix(settings): use system fonts by default
Subject: [PATCH 5/8] fix(settings): use system fonts by default

---
Telegram/SourceFiles/core/core_settings.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Telegram/SourceFiles/core/core_settings.h b/Telegram/SourceFiles/core/core_settings.h
index 6c1ba990..f38ab653 100644
index 87210991..a6cc632c 100644
--- a/Telegram/SourceFiles/core/core_settings.h
+++ b/Telegram/SourceFiles/core/core_settings.h
@@ -11,6 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
Expand All @@ -19,7 +19,7 @@ index 6c1ba990..f38ab653 100644
#include "base/flags.h"
#include "emoji.h"

@@ -1039,7 +1040,7 @@ private:
@@ -1064,7 +1065,7 @@ private:
rpl::variable<bool> _storiesClickTooltipHidden = false;
rpl::variable<bool> _ttlVoiceClickTooltipHidden = false;
WindowPosition _ivPosition;
Expand All @@ -29,5 +29,5 @@ index 6c1ba990..f38ab653 100644
std::optional<bool> _weatherInCelsius;
QByteArray _tonsiteStorageToken;
--
2.46.0
2.47.0

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From e16870c68b906350fc364a3b160ca808a98cb583 Mon Sep 17 00:00:00 2001
From 1d9f98e85ea9ae2a692896286f5eab8b8fdeb2f9 Mon Sep 17 00:00:00 2001
From: Jiangjin Wang <kaymw@aosc.io>
Date: Mon, 6 May 2024 17:15:17 -0700
Subject: [PATCH 6/6] Remove the confusing "Default" option from selectable
Subject: [PATCH 6/8] Remove the confusing "Default" option from selectable
fonts

---
Expand Down Expand Up @@ -45,5 +45,5 @@ index becdc962..550ac863 100644
std::swap(result[2], *nowIt);
++skip;
--
2.46.0
2.47.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 65bc681a85a1edb111cc613503cfa4305c57c508 Mon Sep 17 00:00:00 2001
From: Kaiyang Wu <self@origincode.me>
Date: Fri, 1 Nov 2024 23:15:07 -0700
Subject: [PATCH 7/8] fix(lib_tl): add missing cstring include

Signed-off-by: Kaiyang Wu <self@origincode.me>
---
Telegram/lib_tl/tl/tl_basic_types.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/Telegram/lib_tl/tl/tl_basic_types.h b/Telegram/lib_tl/tl/tl_basic_types.h
index 5eadf62a..961f7feb 100644
--- a/Telegram/lib_tl/tl/tl_basic_types.h
+++ b/Telegram/lib_tl/tl/tl_basic_types.h
@@ -10,6 +10,7 @@
#include "base/flags.h"
#include "base/bytes.h"

+#include <cstring>
#include <QtCore/QVector>

namespace tl {
--
2.47.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From cf311e631852efc2d84b75df542d0d8494e90acd Mon Sep 17 00:00:00 2001
From: Kaiyang Wu <self@origincode.me>
Date: Fri, 1 Nov 2024 23:28:52 -0700
Subject: [PATCH 8/8] fix(lib_webview): add missing cstdint include

Signed-off-by: Kaiyang Wu <self@origincode.me>
---
Telegram/lib_webview/webview/webview_interface.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/Telegram/lib_webview/webview/webview_interface.h b/Telegram/lib_webview/webview/webview_interface.h
index d19d2534..660e5b27 100644
--- a/Telegram/lib_webview/webview/webview_interface.h
+++ b/Telegram/lib_webview/webview/webview_interface.h
@@ -12,6 +12,7 @@
#include <string>
#include <optional>
#include <functional>
+#include <cstdint>

#include <rpl/never.h>
#include <rpl/producer.h>
--
2.47.0

This file was deleted.

7 changes: 0 additions & 7 deletions app-web/telegram-desktop/autobuild/prepare
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
abinfo "Applying deferred patches to Telegram forked WebRTC ..."
for i in autobuild/patches/*.patch.deferred; do
abinfo "Applying ${i} ..."
patch -Np1 -d "../tg_owt" -i "$(readlink -f $i)"
done


abinfo "Making tg_owt..."
cd "$SRCDIR"/../tg_owt
cmake -G Ninja \
Expand Down
6 changes: 3 additions & 3 deletions app-web/telegram-desktop/spec
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
VER=5.5.3
VER=5.7.1
# Update tg_owt to the latest Git snapshot when updating Telegram Desktop
OWTVER=dc17143230b5519f3c1a8da0079e00566bd4c5a8
OWTVER=8198c4d8b91e22d68eb5c7327fd408e3b6abcc79
SRCS="tbl::https://github.com/telegramdesktop/tdesktop/releases/download/v$VER/tdesktop-$VER-full.tar.gz \
git::rename=tg_owt;commit=${OWTVER}::https://github.com/desktop-app/tg_owt"
CHKSUMS="sha256::70366a1c404d716e1f7697813669548eb896e76ce13a766c0b9598dd104fd6b2 \
CHKSUMS="sha256::180a46a5c7fce131e98f033245183634eaeed903a8d91d883e22cd39a3235aca \
SKIP"
SUBDIR="tdesktop-$VER-full"
CHKUPDATE="anitya::id=16951"
Expand Down

0 comments on commit 220bc45

Please sign in to comment.