Telegram: bump version

This commit is contained in:
Gerasim Troeglazov
2021-07-22 21:04:24 +10:00
parent 8726b1a6f3
commit 2ff6d3badb
4 changed files with 250 additions and 196 deletions

View File

@@ -1,144 +1,31 @@
From 29ee1327d94cdbae561fcd9b9a0b1207df6d5a94 Mon Sep 17 00:00:00 2001
From 499ae157579631a8ee27c9fa8b4201e5f4ae6e0e Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Thu, 29 Apr 2021 10:48:29 +1000
Date: Wed, 21 Jul 2021 21:31:29 +1000
Subject: Workaround build issues on GCC8
diff --git a/Telegram/SourceFiles/calls/calls_group_panel.cpp b/Telegram/SourceFiles/calls/calls_group_panel.cpp
index caa7009..094994e 100644
--- a/Telegram/SourceFiles/calls/calls_group_panel.cpp
+++ b/Telegram/SourceFiles/calls/calls_group_panel.cpp
@@ -687,9 +687,9 @@ void Panel::initShareAction() {
_layerBg->showBox(std::move(next));
};
const auto showToast = [=](QString text) {
- Ui::ShowMultilineToast({
- .parentOverride = widget(),
+ Ui::ShowMultilineToast(Ui::MultilineToastArgs{
.text = { text },
+ .parentOverride = widget(),
});
};
auto [shareLinkCallback, shareLinkLifetime] = ShareInviteLinkAction(
@@ -890,13 +890,13 @@ void Panel::setupJoinAsChangedToasts() {
return (state == State::Joined);
}) | rpl::take(1);
}) | rpl::flatten_latest() | rpl::start_with_next([=] {
- Ui::ShowMultilineToast({
- .parentOverride = widget(),
+ Ui::ShowMultilineToast(Ui::MultilineToastArgs{
.text = tr::lng_group_call_join_as_changed(
tr::now,
lt_name,
Ui::Text::Bold(_call->joinAs()->name),
Ui::Text::WithEntities),
+ .parentOverride = widget(),
});
}, widget()->lifetime());
diff --git a/Telegram/SourceFiles/calls/group/calls_group_panel.cpp b/Telegram/SourceFiles/calls/group/calls_group_panel.cpp
index eef148c..ffe07a3 100644
--- a/Telegram/SourceFiles/calls/group/calls_group_panel.cpp
+++ b/Telegram/SourceFiles/calls/group/calls_group_panel.cpp
@@ -208,10 +208,10 @@ void Panel::showToast(TextWithEntities &&text, crl::time duration) {
if (const auto strong = _lastToast.get()) {
strong->hideAnimated();
}
- _lastToast = Ui::ShowMultilineToast({
- .parentOverride = widget(),
+ _lastToast = Ui::ShowMultilineToast(Ui::MultilineToastArgs{
.text = std::move(text),
.duration = duration,
+ .parentOverride = widget(),
});
}
@@ -910,13 +910,13 @@ void Panel::setupTitleChangedToasts() {
? _peer->name
: _peer->groupCall()->title();
}) | rpl::start_with_next([=](const QString &title) {
- Ui::ShowMultilineToast({
- .parentOverride = widget(),
+ Ui::ShowMultilineToast(Ui::MultilineToastArgs{
.text = tr::lng_group_call_title_changed(
tr::now,
lt_title,
Ui::Text::Bold(title),
Ui::Text::WithEntities),
+ .parentOverride = widget(),
});
}, widget()->lifetime());
}
@@ -925,9 +925,9 @@ void Panel::setupAllowedToSpeakToasts() {
_call->allowedToSpeakNotifications(
) | rpl::start_with_next([=] {
if (isActive()) {
- Ui::ShowMultilineToast({
- .parentOverride = widget(),
+ Ui::ShowMultilineToast(Ui::MultilineToastArgs{
.text = { tr::lng_group_call_can_speak_here(tr::now) },
+ .parentOverride = widget(),
});
} else {
const auto real = _call->lookupReal();
@@ -962,9 +962,9 @@ void Panel::subscribeToChanges(not_null<Data::GroupCall*> real) {
const auto skip = st::groupCallRecordingMarkSkip;
_recordingMark->resize(size + 2 * skip, size + 2 * skip);
_recordingMark->setClickedCallback([=] {
- Ui::ShowMultilineToast({
- .parentOverride = widget(),
+ Ui::ShowMultilineToast(Ui::MultilineToastArgs{
.text = { tr::lng_group_call_is_recorded(tr::now) },
+ .parentOverride = widget(),
});
});
const auto animate = [=] {
@@ -1001,8 +1001,7 @@ void Panel::subscribeToChanges(not_null<Data::GroupCall*> real) {
) | rpl::distinct_until_changed(
) | rpl::start_with_next([=](bool recorded) {
validateRecordingMark(recorded);
- Ui::ShowMultilineToast({
- .parentOverride = widget(),
+ Ui::ShowMultilineToast(Ui::MultilineToastArgs{
.text = (recorded
? tr::lng_group_call_recording_started
: _call->recordingStoppedByMe()
@@ -1010,6 +1009,7 @@ void Panel::subscribeToChanges(not_null<Data::GroupCall*> real) {
: tr::lng_group_call_recording_stopped)(
tr::now,
Ui::Text::RichLangValue),
+ .parentOverride = widget(),
});
}, widget()->lifetime());
validateRecordingMark(real->recordStartDate() != 0);
@@ -1060,9 +1060,9 @@ void Panel::chooseJoinAs() {
_layerBg->showBox(std::move(next));
};
const auto showToast = [=](QString text) {
- Ui::ShowMultilineToast({
- .parentOverride = widget(),
+ Ui::ShowMultilineToast(Ui::MultilineToastArgs{
.text = { text },
+ .parentOverride = widget(),
});
};
_joinAsProcess.start(
@@ -1157,23 +1157,23 @@ void Panel::addMembers() {
}
const auto result = call->inviteUsers(users);
if (const auto user = std::get_if<not_null<UserData*>>(&result)) {
- Ui::ShowMultilineToast({
- .parentOverride = widget(),
+ Ui::ShowMultilineToast(Ui::MultilineToastArgs{
.text = tr::lng_group_call_invite_done_user(
tr::now,
lt_user,
Ui::Text::Bold((*user)->firstName),
Ui::Text::WithEntities),
+ .parentOverride = widget(),
});
} else if (const auto count = std::get_if<int>(&result)) {
if (*count > 0) {
- Ui::ShowMultilineToast({
- .parentOverride = widget(),
+ Ui::ShowMultilineToast(Ui::MultilineToastArgs{
.text = tr::lng_group_call_invite_done_many(
tr::now,
lt_count,
*count,
Ui::Text::RichLangValue),
+ .parentOverride = widget(),
});
}
} else {
diff --git a/Telegram/SourceFiles/calls/calls_group_settings.cpp b/Telegram/SourceFiles/calls/calls_group_settings.cpp
index 9ae8bbc..19eec41 100644
--- a/Telegram/SourceFiles/calls/calls_group_settings.cpp
+++ b/Telegram/SourceFiles/calls/calls_group_settings.cpp
@@ -534,9 +534,9 @@ void SettingsBox(
diff --git a/Telegram/SourceFiles/calls/group/calls_group_settings.cpp b/Telegram/SourceFiles/calls/group/calls_group_settings.cpp
index 19f3f37..d531906 100644
--- a/Telegram/SourceFiles/calls/group/calls_group_settings.cpp
+++ b/Telegram/SourceFiles/calls/group/calls_group_settings.cpp
@@ -550,9 +550,9 @@ void SettingsBox(
box->getDelegate()->show(std::move(next));
});
const auto showToast = crl::guard(box, [=](QString text) {
@@ -150,7 +37,7 @@ index 9ae8bbc..19eec41 100644
});
});
auto [shareLinkCallback, shareLinkLifetime] = ShareInviteLinkAction(
@@ -572,9 +572,9 @@ void SettingsBox(
@@ -588,9 +588,9 @@ void SettingsBox(
}
QGuiApplication::clipboard()->setText(link);
if (weakBox) {
@@ -162,6 +49,24 @@ index 9ae8bbc..19eec41 100644
});
}
return true;
diff --git a/Telegram/SourceFiles/calls/group/calls_group_viewport_opengl.cpp b/Telegram/SourceFiles/calls/group/calls_group_viewport_opengl.cpp
index cfc3b49..71c0e86 100644
--- a/Telegram/SourceFiles/calls/group/calls_group_viewport_opengl.cpp
+++ b/Telegram/SourceFiles/calls/group/calls_group_viewport_opengl.cpp
@@ -1276,11 +1276,13 @@ void Viewport::RendererGL::validateDatas() {
request.updating = true;
} else {
// This invalidates maybeStale*, but they're already equal.
+#ifndef Q_OS_HAIKU
_tileData.push_back({
.id = id,
.peer = peer,
.pause = paused,
});
+#endif
}
const auto nameTop = pausedBottom + index * nameHeight;
_tileData[index].nameVersion = peer->nameVersion;
diff --git a/Telegram/SourceFiles/history/view/history_view_schedule_box.cpp b/Telegram/SourceFiles/history/view/history_view_schedule_box.cpp
index 593c292..af8222a 100644
--- a/Telegram/SourceFiles/history/view/history_view_schedule_box.cpp
@@ -175,6 +80,26 @@ index 593c292..af8222a 100644
.title = (type == SendMenu::Type::Reminder
? tr::lng_remind_title()
: tr::lng_schedule_title()),
diff --git a/Telegram/SourceFiles/media/streaming/media_streaming_video_track.cpp b/Telegram/SourceFiles/media/streaming/media_streaming_video_track.cpp
index 6736255..ab53ed3 100644
--- a/Telegram/SourceFiles/media/streaming/media_streaming_video_track.cpp
+++ b/Telegram/SourceFiles/media/streaming/media_streaming_video_track.cpp
@@ -1141,13 +1141,13 @@ FrameWithInfo VideoTrack::frameWithInfo(const Instance *instance) {
const auto data = _shared->frameForPaintWithIndex();
const auto i = data.frame->prepared.find(instance);
const auto none = (i == data.frame->prepared.end());
- if (none || i->second.request.requireARGB32) {
+/* if (none || i->second.request.requireARGB32) {
_wrapped.with([=](Implementation &unwrapped) {
unwrapped.updateFrameRequest(
instance,
{ .requireARGB32 = false });
});
- }
+ }*/
return {
.original = data.frame->original,
.yuv420 = &data.frame->yuv420,
diff --git a/Telegram/SourceFiles/payments/ui/payments_edit_card.cpp b/Telegram/SourceFiles/payments/ui/payments_edit_card.cpp
index d09b6da..979668d 100644
--- a/Telegram/SourceFiles/payments/ui/payments_edit_card.cpp
@@ -314,11 +239,11 @@ index a9f27fe..704c94e 100644
.submit = tr::lng_settings_save(),
.done = save,
diff --git a/Telegram/SourceFiles/ui/toasts/common_toasts.h b/Telegram/SourceFiles/ui/toasts/common_toasts.h
index ebf1efe..33b1db0 100644
index 7384c0a..12d4e17 100644
--- a/Telegram/SourceFiles/ui/toasts/common_toasts.h
+++ b/Telegram/SourceFiles/ui/toasts/common_toasts.h
@@ -12,9 +12,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace Ui {
@@ -16,9 +16,9 @@ class Instance;
} // namespace Toast
struct MultilineToastArgs {
- QWidget *parentOverride = nullptr;
@@ -327,7 +252,7 @@ index ebf1efe..33b1db0 100644
+ QWidget *parentOverride = nullptr;
};
void ShowMultilineToast(MultilineToastArgs &&args);
base::weak_ptr<Toast::Instance> ShowMultilineToast(
diff --git a/Telegram/SourceFiles/ui/widgets/separate_panel.cpp b/Telegram/SourceFiles/ui/widgets/separate_panel.cpp
index ccc7559..2b37bc2 100644
--- a/Telegram/SourceFiles/ui/widgets/separate_panel.cpp

View File

@@ -1,11 +1,11 @@
From b5b050d4183c761e2289ed1ead50b563d6928b82 Mon Sep 17 00:00:00 2001
From 0201e160117940d8948eea4d527841884f4c0f9d Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Thu, 29 Apr 2021 09:47:15 +1000
Date: Wed, 21 Jul 2021 19:12:34 +1000
Subject: Add Haiku support
diff --git a/Telegram/ThirdParty/libtgvoip/VoIPController.cpp b/Telegram/ThirdParty/libtgvoip/VoIPController.cpp
index d0b0038..c2c258b 100644
index baaedca..3384448 100644
--- a/Telegram/ThirdParty/libtgvoip/VoIPController.cpp
+++ b/Telegram/ThirdParty/libtgvoip/VoIPController.cpp
@@ -8,6 +8,9 @@
@@ -883,7 +883,7 @@ index 0bc42eb..c87cde9 100644
typedef pid_t PlatformThreadId;
typedef pthread_t PlatformThreadRef;
diff --git a/Telegram/cmake/lib_tgvoip.cmake b/Telegram/cmake/lib_tgvoip.cmake
index 7616728..51566ba 100644
index 6c97e3c..2fb87d5 100644
--- a/Telegram/cmake/lib_tgvoip.cmake
+++ b/Telegram/cmake/lib_tgvoip.cmake
@@ -123,6 +123,14 @@ if (NOT TGVOIP_FOUND)
@@ -925,8 +925,8 @@ index 7616728..51566ba 100644
+ media
+ )
else()
target_compile_options(lib_tgvoip_bundled
PRIVATE
add_library(lib_tgvoip_bundled_options INTERFACE)
target_compile_options(lib_tgvoip_bundled_options
--
2.30.2

View File

@@ -1,14 +1,14 @@
From 9a386a88394ae26c367a751e5ef3d2994b6e8ede Mon Sep 17 00:00:00 2001
From 511b4a8a312547147ec6a7727810a61d8f8a0da4 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Thu, 29 Apr 2021 10:53:49 +1000
Date: Wed, 21 Jul 2021 19:13:06 +1000
Subject: Add Haiku support
diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt
index c2868db..7cf6c73 100644
index 1613253..9cc05f8 100644
--- a/Telegram/CMakeLists.txt
+++ b/Telegram/CMakeLists.txt
@@ -135,6 +135,14 @@ elseif (LINUX)
@@ -135,6 +135,15 @@ if (LINUX)
endif()
endif()
@@ -16,6 +16,7 @@ index c2868db..7cf6c73 100644
+ target_link_libraries(Telegram
+ PRIVATE
+ be
+ jpeg
+ translation
+ )
+endif()
@@ -23,7 +24,7 @@ index c2868db..7cf6c73 100644
target_precompile_headers(Telegram PRIVATE ${src_loc}/stdafx.h)
nice_target_sources(Telegram ${src_loc}
PRIVATE
@@ -1142,6 +1150,16 @@ if (DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
@@ -1217,6 +1226,16 @@ else()
)
endif()
@@ -38,9 +39,9 @@ index c2868db..7cf6c73 100644
+endif()
+
if (DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
remove_target_sources(Telegram ${src_loc} platform/linux/linux_wayland_integration.cpp)
nice_target_sources(Telegram ${src_loc} PRIVATE platform/linux/linux_wayland_integration_dummy.cpp)
@@ -1268,7 +1286,7 @@ elseif (build_osx)
remove_target_sources(Telegram ${src_loc}
platform/linux/linux_wayland_integration.cpp
@@ -1345,7 +1364,7 @@ elseif (build_osx)
else()
set(bundle_identifier "com.tdesktop.Telegram$<$<CONFIG:Debug>:Debug>")
set(bundle_entitlements "Telegram.entitlements")
@@ -50,10 +51,10 @@ index c2868db..7cf6c73 100644
else()
set(output_name "Telegram")
diff --git a/Telegram/SourceFiles/core/core_settings.h b/Telegram/SourceFiles/core/core_settings.h
index 963e640..f67bc56 100644
index 63c803c..72cdf1b 100644
--- a/Telegram/SourceFiles/core/core_settings.h
+++ b/Telegram/SourceFiles/core/core_settings.h
@@ -620,7 +620,7 @@ private:
@@ -687,7 +687,7 @@ private:
rpl::variable<float64> _dialogsWidthRatio; // per-window
rpl::variable<int> _thirdColumnWidth = kDefaultThirdColumnWidth; // p-w
bool _notifyFromAll = true;
@@ -63,10 +64,10 @@ index 963e640..f67bc56 100644
rpl::variable<bool> _systemDarkModeEnabled = false;
WindowPosition _windowPosition; // per-window
diff --git a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp
index 92dc891..6a6b737 100644
index a692a70..495cd54 100644
--- a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp
+++ b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp
@@ -16,6 +16,15 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
@@ -15,6 +15,15 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "platform/linux/linux_xdp_open_with_dialog.h"
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
@@ -81,8 +82,8 @@ index 92dc891..6a6b737 100644
+
#include <QtCore/QProcess>
#include <QtGui/QDesktopServices>
#include <QtWidgets/QFileDialog>
@@ -49,6 +58,23 @@ void UnsafeOpenEmailLink(const QString &email) {
@@ -47,6 +56,23 @@ void UnsafeOpenEmailLink(const QString &email) {
}
bool UnsafeShowOpenWith(const QString &filepath) {
@@ -107,10 +108,10 @@ index 92dc891..6a6b737 100644
if (internal::ShowXDPOpenWithDialog(filepath)) {
return true;
diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp
index 624e510..4290656 100644
index 2dcee5b..a05b29d 100644
--- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp
+++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp
@@ -651,11 +651,17 @@ bool MainWindow::hasTrayIcon() const {
@@ -902,11 +902,17 @@ bool MainWindow::hasTrayIcon() const {
bool MainWindow::isActiveForTrayMenu() {
updateIsActive();
@@ -128,7 +129,7 @@ index 624e510..4290656 100644
}
void MainWindow::psTrayMenuUpdated() {
@@ -826,7 +832,9 @@ void MainWindow::psSetupTrayIcon() {
@@ -937,7 +943,9 @@ void MainWindow::psSetupTrayIcon() {
if (!trayIcon) {
trayIcon = new QSystemTrayIcon(this);
trayIcon->setIcon(TrayIconGen(counter, muted));
@@ -139,7 +140,7 @@ index 624e510..4290656 100644
attachToTrayIcon(trayIcon);
}
updateIconCounters();
@@ -919,8 +927,10 @@ void MainWindow::updateIconCounters() {
@@ -1030,8 +1038,10 @@ void MainWindow::updateIconCounters() {
}
void MainWindow::initTrayMenuHook() {
@@ -149,13 +150,13 @@ index 624e510..4290656 100644
+#endif
}
#ifdef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
void MainWindow::createGlobalMenu() {
diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp
new file mode 100644
index 0000000..7d4656c
index 0000000..72bda83
--- /dev/null
+++ b/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp
@@ -0,0 +1,271 @@
@@ -0,0 +1,270 @@
+/*
+This file is part of Telegram Desktop for Haiku,
+
@@ -274,7 +275,7 @@ index 0000000..7d4656c
+
+ QTimer *_checkNotificationTimer;
+ Window::Notifications::CachedUserpics _cachedUserpics;
+ base::weak_ptr<Manager> _manager;
+ const not_null<Manager*> _manager;
+ int32 _portId;
+};
+
@@ -326,15 +327,14 @@ index 0000000..7d4656c
+ uint64 peerId = message.GetUInt64("peer", 0);
+ int32 messageId = message.GetInt32("message", 0);
+
+ const auto my = Window::Notifications::Manager::NotificationId{
+ .full = Manager::FullPeer{
+ .sessionId = sessionId,
+ .peerId = PeerId(peerId)
+ },
+ .msgId = messageId
+ const auto key = FullPeer{
+ .sessionId = sessionId,
+ .peerId = PeerId(peerId)
+ };
+ crl::on_main(_manager, [=] {
+ _manager->notificationActivated(my);
+ const auto notificationId = NotificationId{ .full = key, .msgId = messageId };
+
+ crl::on_main(this, [=] {
+ _manager->notificationActivated(notificationId);
+ });
+ }
+ delete[] buffer;
@@ -428,7 +428,7 @@ index 0000000..7d4656c
+} // namespace Notifications
+} // namespace Platform
diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp
index 7ea7d2a..3f4edd8 100644
index 2fa0be9..539b1d9 100644
--- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp
+++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp
@@ -36,6 +36,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
@@ -442,7 +442,17 @@ index 7ea7d2a..3f4edd8 100644
#include <QtWidgets/QApplication>
#include <QtWidgets/QStyle>
#include <QtWidgets/QDesktopWidget>
@@ -664,7 +668,7 @@ QString GetHomeDir() {
@@ -48,7 +52,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <gio/gio.h>
#include <glibmm.h>
#include <giomm.h>
+#ifndef Q_OS_HAIKU
#include <jemalloc/jemalloc.h>
+#endif
#include <sys/stat.h>
#include <sys/types.h>
@@ -657,7 +663,7 @@ QString GetHomeDir() {
return home;
}
@@ -451,7 +461,7 @@ index 7ea7d2a..3f4edd8 100644
void HaikuAutostart(bool start) {
const auto home = GetHomeDir();
if (home.isEmpty()) {
@@ -689,7 +693,7 @@ void HaikuAutostart(bool start) {
@@ -682,7 +688,7 @@ void HaikuAutostart(bool start) {
file.remove();
}
}
@@ -460,7 +470,7 @@ index 7ea7d2a..3f4edd8 100644
} // namespace
@@ -706,8 +710,11 @@ QString psAppDataPath() {
@@ -699,8 +705,11 @@ QString psAppDataPath() {
return oldPath;
}
}
@@ -473,7 +483,18 @@ index 7ea7d2a..3f4edd8 100644
}
void psDoCleanup() {
@@ -933,7 +940,7 @@ bool OpenSystemSettings(SystemSettingsType type) {
@@ -728,8 +737,9 @@ namespace Platform {
void start() {
auto backgroundThread = true;
+#ifndef Q_OS_HAIKU
mallctl("background_thread", nullptr, nullptr, &backgroundThread, sizeof(bool));
-
+#endif
LOG(("Launcher filename: %1").arg(QGuiApplication::desktopFileName()));
#ifndef DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
@@ -926,7 +936,7 @@ bool OpenSystemSettings(SystemSettingsType type) {
} else if (DesktopEnvironment::IsMATE()) {
add("mate-volume-control");
}
@@ -482,7 +503,7 @@ index 7ea7d2a..3f4edd8 100644
add("Media");
#endif // __ HAIKU__
add("pavucontrol-qt");
@@ -978,17 +985,17 @@ void finish() {
@@ -980,17 +990,17 @@ void finish() {
} // namespace Platform
void psNewVersion() {
@@ -504,6 +525,41 @@ index 7ea7d2a..3f4edd8 100644
if (InFlatpak()) {
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
diff --git a/Telegram/ThirdParty/tgcalls/tgcalls/MediaManager.cpp b/Telegram/ThirdParty/tgcalls/tgcalls/MediaManager.cpp
index 7f76efc..4608bce 100644
--- a/Telegram/ThirdParty/tgcalls/tgcalls/MediaManager.cpp
+++ b/Telegram/ThirdParty/tgcalls/tgcalls/MediaManager.cpp
@@ -873,7 +873,7 @@ void MediaManager::fillCallStats(CallStats &callStats) {
}
void MediaManager::setAudioInputDevice(std::string id) {
-#if defined(WEBRTC_IOS)
+#if defined(WEBRTC_IOS) || defined(__HAIKU__)
#else
SetAudioInputDeviceById(_audioDeviceModule.get(), id);
#endif
diff --git a/Telegram/ThirdParty/tgcalls/tgcalls/group/GroupInstanceCustomImpl.cpp b/Telegram/ThirdParty/tgcalls/tgcalls/group/GroupInstanceCustomImpl.cpp
index 85056e1..6ae8ad1 100644
--- a/Telegram/ThirdParty/tgcalls/tgcalls/group/GroupInstanceCustomImpl.cpp
+++ b/Telegram/ThirdParty/tgcalls/tgcalls/group/GroupInstanceCustomImpl.cpp
@@ -2783,7 +2783,7 @@ public:
}
void setAudioOutputDevice(const std::string &id) {
-#ifndef WEBRTC_IOS
+#if !defined(WEBRTC_IOS) && !defined(__HAIKU__)
_threads->getWorkerThread()->Invoke<void>(RTC_FROM_HERE, [&] {
SetAudioOutputDeviceById(_audioDeviceModule.get(), id);
});
@@ -2791,7 +2791,7 @@ public:
}
void setAudioInputDevice(const std::string &id) {
-#ifndef WEBRTC_IOS
+#if !defined(WEBRTC_IOS) && !defined(__HAIKU__)
_threads->getWorkerThread()->Invoke<void>(RTC_FROM_HERE, [&] {
SetAudioInputDeviceById(_audioDeviceModule.get(), id);
});
diff --git a/Telegram/lib_base/base/haiku_types.h b/Telegram/lib_base/base/haiku_types.h
new file mode 100644
index 0000000..3a57ce2
@@ -535,10 +591,10 @@ index 0000000..3a57ce2
+
+#endif
diff --git a/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp b/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp
index 4c6d431..801df3f 100644
index 6bb82ec..678b7f2 100644
--- a/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp
+++ b/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp
@@ -26,8 +26,58 @@
@@ -25,8 +25,58 @@
#include <stdio.h>
#include <fcntl.h>
@@ -597,7 +653,7 @@ index 4c6d431..801df3f 100644
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
bool PortalShowInFolder(const QString &filepath) {
@@ -149,6 +199,12 @@ bool ShowInFolder(const QString &filepath) {
@@ -151,6 +201,12 @@ bool ShowInFolder(const QString &filepath) {
}
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
@@ -611,7 +667,7 @@ index 4c6d431..801df3f 100644
return true;
}
diff --git a/Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp b/Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp
index 4a60022..51e817e 100644
index 1021c85..fd6e541 100644
--- a/Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp
+++ b/Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp
@@ -24,6 +24,11 @@
@@ -626,7 +682,7 @@ index 4a60022..51e817e 100644
namespace base::Platform {
namespace {
@@ -166,9 +171,23 @@ std::optional<crl::time> MutterDBusLastUserInputTime() {
@@ -184,9 +189,23 @@ std::optional<crl::time> MutterDBusLastUserInputTime() {
}
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
@@ -651,7 +707,7 @@ index 4a60022..51e817e 100644
if (::Platform::IsX11()) {
const auto xcbResult = XCBLastUserInputTime();
diff --git a/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp b/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp
index fff7db9..88b7e6b 100644
index 88ce978..a0e2669 100644
--- a/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp
+++ b/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp
@@ -10,6 +10,10 @@
@@ -663,13 +719,13 @@ index fff7db9..88b7e6b 100644
+#endif
+
#include <QtCore/QFile>
#include <QtCore/QEventLoop>
#include <QtGui/QWindow>
diff --git a/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp b/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp
index e5a258f..b06b29b 100644
index 8d95acc..f49568c 100644
--- a/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp
+++ b/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp
@@ -579,7 +579,7 @@ TitleControls::Layout TitleControlsLayout() {
@@ -552,7 +552,7 @@ TitleControls::Layout TitleControlsLayout() {
return *gtkResult;
}
@@ -678,7 +734,7 @@ index e5a258f..b06b29b 100644
return TitleControls::Layout{
.left = {
TitleControls::Control::Close,
@@ -589,7 +589,7 @@ TitleControls::Layout TitleControlsLayout() {
@@ -562,7 +562,7 @@ TitleControls::Layout TitleControlsLayout() {
TitleControls::Control::Maximize,
}
};
@@ -687,7 +743,7 @@ index e5a258f..b06b29b 100644
return TitleControls::Layout{
.right = {
TitleControls::Control::Minimize,
@@ -597,7 +597,7 @@ TitleControls::Layout TitleControlsLayout() {
@@ -570,7 +570,7 @@ TitleControls::Layout TitleControlsLayout() {
TitleControls::Control::Close,
}
};
@@ -697,7 +753,7 @@ index e5a258f..b06b29b 100644
} // namespace Platform
diff --git a/Telegram/lib_webrtc/webrtc/details/webrtc_openal_adm.cpp b/Telegram/lib_webrtc/webrtc/details/webrtc_openal_adm.cpp
index 6dcfe80..9f220b4 100644
index 74a48cd..816370d 100644
--- a/Telegram/lib_webrtc/webrtc/details/webrtc_openal_adm.cpp
+++ b/Telegram/lib_webrtc/webrtc/details/webrtc_openal_adm.cpp
@@ -4,6 +4,11 @@
@@ -731,3 +787,73 @@ index 092b667..204e259 100644
--
2.30.2
From b3a5fd58c2fd7ae49e6501ca0e7c69dab32956d6 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 21 Jul 2021 21:31:05 +1000
Subject: Disable jemalloc
diff --git a/cmake/external/CMakeLists.txt b/cmake/external/CMakeLists.txt
index 118178c..fd3fde1 100644
--- a/cmake/external/CMakeLists.txt
+++ b/cmake/external/CMakeLists.txt
@@ -37,7 +37,7 @@ if (add_hunspell_library)
add_checked_subdirectory(hunspell)
endif()
add_checked_subdirectory(iconv)
-if (LINUX)
+if (LINUX AND NOT HAIKU)
add_checked_subdirectory(jemalloc)
endif()
add_checked_subdirectory(jpeg)
diff --git a/cmake/options_linux.cmake b/cmake/options_linux.cmake
index e7b164f..56cd720 100644
--- a/cmake/options_linux.cmake
+++ b/cmake/options_linux.cmake
@@ -58,10 +58,12 @@ if (DESKTOP_APP_SPECIAL_TARGET)
endif()
endif()
+if (NOT HAIKU)
target_link_libraries(common_options
INTERFACE
desktop-app::external_jemalloc
)
+endif()
if (DESKTOP_APP_USE_PACKAGED)
find_library(ATOMIC_LIBRARY atomic)
--
2.30.2
From 7371b5cbdfa20eeae33bb0dca6be6524eea25eaa Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Thu, 22 Jul 2021 18:54:24 +1000
Subject: Remove ShareScreen menu item
diff --git a/Telegram/SourceFiles/calls/group/calls_group_menu.cpp b/Telegram/SourceFiles/calls/group/calls_group_menu.cpp
index b523cc2..7f29cd2 100644
--- a/Telegram/SourceFiles/calls/group/calls_group_menu.cpp
+++ b/Telegram/SourceFiles/calls/group/calls_group_menu.cpp
@@ -635,6 +635,7 @@ void FillMenu(
real->recordStartDateValue(),
handler));
}
+#ifndef Q_OS_HAIKU
if (addScreenCast) {
const auto sharing = call->isSharingScreen();
const auto toggle = [=] {
@@ -652,6 +653,7 @@ void FillMenu(
: tr::lng_group_call_screen_share_start(tr::now)),
toggle);
}
+#endif
menu->addAction(tr::lng_group_call_settings(tr::now), [=] {
if (const auto strong = weak.get()) {
showBox(Box(SettingsBox, strong));
--
2.30.2

View File

@@ -5,7 +5,7 @@ COPYRIGHT="2013-2021 Telegram"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v$portVersion/tdesktop-$portVersion-full.tar.gz"
CHECKSUM_SHA256="97526f0b4adf04cf86b605ae84f3efaacf58eb8f828bab8f4fe752a4fac62fb2"
CHECKSUM_SHA256="168487a59a8ae6ca1fbd66ccefc9eae19344af61bfb8d4cdde3cf73c115aa9dc"
SOURCE_FILENAME="tdesktop-$portVersion-full.tar.gz"
SOURCE_DIR="tdesktop-$portVersion-full"
srcGitRev_2="2b383fe05f8ae78ac99470b9a2b9ea22b3ee5a92"
@@ -50,6 +50,7 @@ REQUIRES="
lib:libQt5Gui$secondaryArchSuffix
lib:libQt5Network$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
lib:librnnoise$secondaryArchSuffix
lib:libsigc_2.0$secondaryArchSuffix
lib:libswresample$secondaryArchSuffix
lib:libswscale$secondaryArchSuffix
@@ -79,6 +80,7 @@ BUILD_REQUIRES="
devel:libQt5Network$secondaryArchSuffix
devel:libQt5Widgets$secondaryArchSuffix
devel:librapidjson$secondaryArchSuffix
devel:librnnoise$secondaryArchSuffix
devel:libswresample$secondaryArchSuffix
devel:libswscale$secondaryArchSuffix
devel:libtg_owt$secondaryArchSuffix
@@ -88,6 +90,7 @@ BUILD_REQUIRES="
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gawk
cmd:gcc$secondaryArchSuffix
cmd:lrelease$secondaryArchSuffix >= 5
cmd:make