Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net-im/telegram-desktop: update to 4.10.2 release
- Loading branch information
Showing
6 changed files
with
144 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
TIMESTAMP = 1695904525 | ||
SHA256 (tdesktop-4.9.8-full.tar.gz) = af041ecb623ee7603781e0ff2b262e15bb8de2858a9a42982a10396bc9014d53 | ||
SIZE (tdesktop-4.9.8-full.tar.gz) = 73655253 | ||
TIMESTAMP = 1696263386 | ||
SHA256 (tdesktop-4.10.2-full.tar.gz) = 3f7aa12bf421a7fb6e9db9669f63bb6e1351cec2e7567551cef4ff2d936f2a27 | ||
SIZE (tdesktop-4.10.2-full.tar.gz) = 67750091 |
120 changes: 120 additions & 0 deletions
120
...desktop/files/patch-Telegram_SourceFiles_platform_linux_notifications__manager__linux.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
--- Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp.orig 2023-09-29 15:29:53 UTC | ||
+++ Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp | ||
@@ -53,6 +53,10 @@ bool ServiceRegistered = false; | ||
ServerInformation CurrentServerInformation; | ||
std::vector<Glib::ustring> CurrentCapabilities; | ||
|
||
+[[nodiscard]] bool HasCapability(const char *value) { | ||
+ return ranges::contains(CurrentCapabilities, value, &Glib::ustring::raw); | ||
+} | ||
+ | ||
void Noexcept(Fn<void()> callback, Fn<void()> failed = nullptr) noexcept { | ||
try { | ||
callback(); | ||
@@ -446,7 +450,6 @@ bool NotificationData::init( | ||
} | ||
|
||
const auto weak = base::make_weak(this); | ||
- const auto &capabilities = CurrentCapabilities; | ||
|
||
const auto signalEmitted = crl::guard(weak, [=]( | ||
const Glib::RefPtr<Gio::DBus::Connection> &connection, | ||
@@ -496,7 +499,7 @@ bool NotificationData::init( | ||
|
||
_imageKey = GetImageKey(CurrentServerInformation.specVersion); | ||
|
||
- if (ranges::contains(capabilities, "body-markup")) { | ||
+ if (HasCapability("body-markup")) { | ||
_title = title.toStdString(); | ||
|
||
_body = subtitle.isEmpty() | ||
@@ -512,7 +515,7 @@ bool NotificationData::init( | ||
_body = msg.toStdString(); | ||
} | ||
|
||
- if (ranges::contains(capabilities, "actions")) { | ||
+ if (HasCapability("actions")) { | ||
_actions.push_back("default"); | ||
_actions.push_back(tr::lng_open_link(tr::now).toStdString()); | ||
|
||
@@ -523,7 +526,7 @@ bool NotificationData::init( | ||
tr::lng_context_mark_read(tr::now).toStdString()); | ||
} | ||
|
||
- if (ranges::contains(capabilities, "inline-reply") | ||
+ if (HasCapability("inline-reply") | ||
&& !options.hideReplyButton) { | ||
_actions.push_back("inline-reply"); | ||
_actions.push_back( | ||
@@ -553,13 +556,13 @@ bool NotificationData::init( | ||
kObjectPath); | ||
} | ||
|
||
- if (ranges::contains(capabilities, "action-icons")) { | ||
+ if (HasCapability("action-icons")) { | ||
_hints["action-icons"] = Glib::create_variant(true); | ||
} | ||
|
||
// suppress system sound if telegram sound activated, | ||
// otherwise use system sound | ||
- if (ranges::contains(capabilities, "sound")) { | ||
+ if (HasCapability("sound")) { | ||
if (Core::App().settings().soundNotify()) { | ||
_hints["suppress-sound"] = Glib::create_variant(true); | ||
} else { | ||
@@ -569,7 +572,7 @@ bool NotificationData::init( | ||
} | ||
} | ||
|
||
- if (ranges::contains(capabilities, "x-canonical-append")) { | ||
+ if (HasCapability("x-canonical-append")) { | ||
_hints["x-canonical-append"] = Glib::create_variant( | ||
Glib::ustring("true")); | ||
} | ||
@@ -805,7 +808,7 @@ bool ByDefault() { | ||
|
||
// A list of capabilities that offer feature parity | ||
// with custom notifications | ||
- return ranges::all_of(std::initializer_list{ | ||
+ return ranges::all_of(std::array{ | ||
// To show message content | ||
"body", | ||
// To have buttons on notifications | ||
@@ -816,7 +819,7 @@ bool ByDefault() { | ||
// (no, using sound capability is not a way) | ||
"inhibitions", | ||
}, [](const auto *capability) { | ||
- return ranges::contains(CurrentCapabilities, capability); | ||
+ return HasCapability(capability); | ||
}); | ||
} | ||
|
||
@@ -909,7 +912,6 @@ class Manager::Private : public base::has_weak_ptr { ( | ||
Manager::Private::Private(not_null<Manager*> manager) | ||
: _manager(manager) { | ||
const auto &serverInformation = CurrentServerInformation; | ||
- const auto &capabilities = CurrentCapabilities; | ||
|
||
if (!serverInformation.name.empty()) { | ||
LOG(("Notification daemon product name: %1") | ||
@@ -931,17 +933,17 @@ Manager::Private::Private(not_null<Manager*> manager) | ||
.arg(serverInformation.specVersion.toString())); | ||
} | ||
|
||
- if (!capabilities.empty()) { | ||
+ if (!CurrentCapabilities.empty()) { | ||
LOG(("Notification daemon capabilities: %1").arg( | ||
ranges::fold_left( | ||
- capabilities, | ||
+ CurrentCapabilities, | ||
"", | ||
[](const Glib::ustring &a, const Glib::ustring &b) { | ||
return a + (a.empty() ? "" : ", ") + b; | ||
}).c_str())); | ||
} | ||
|
||
- if (ranges::contains(capabilities, "inhibitions")) { | ||
+ if (HasCapability("inhibitions")) { | ||
Noexcept([&] { | ||
_dbusConnection = Gio::DBus::Connection::get_sync( | ||
Gio::DBus::BusType::SESSION); |
20 changes: 20 additions & 0 deletions
20
...-desktop/files/patch-Telegram_lib__base_base_platform_linux_base__linux__xdp__utilities.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.h.orig 2023-10-01 14:40:15 UTC | ||
+++ Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.h | ||
@@ -78,7 +78,7 @@ class SettingWatcher { (public) | ||
|
||
template <typename Callback> | ||
SettingWatcher(Callback callback) | ||
- : SettingWatcher(Fn(callback)) { | ||
+ : SettingWatcher(std::function(callback)) { | ||
} | ||
|
||
template <typename ...Args> | ||
@@ -101,7 +101,7 @@ class SettingWatcher { (public) | ||
const Glib::ustring &group, | ||
const Glib::ustring &key, | ||
Callback callback) | ||
- : SettingWatcher(group, key, Fn(callback)) { | ||
+ : SettingWatcher(group, key, std::function(callback)) { | ||
} | ||
|
||
~SettingWatcher(); |
14 changes: 0 additions & 14 deletions
14
...p/files/patch-Telegram_lib__webview_webview_platform_linux_webview__linux__compositor.cpp
This file was deleted.
Oops, something went wrong.
48 changes: 0 additions & 48 deletions
48
...op/files/patch-Telegram_lib__webview_webview_platform_linux_webview__linux__webkitgtk.cpp
This file was deleted.
Oops, something went wrong.