From 613f2ba708786c6f90049c4cae70c5a27215a51b Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Fri, 3 Sep 2021 16:04:31 +0300 Subject: [PATCH] Replaced instant base::call_delayed with InvokeQueued. --- Telegram/SourceFiles/mainwindow.cpp | 3 +-- Telegram/SourceFiles/window/main_window.cpp | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/mainwindow.cpp b/Telegram/SourceFiles/mainwindow.cpp index 819e47093e..8e5d3c95b1 100644 --- a/Telegram/SourceFiles/mainwindow.cpp +++ b/Telegram/SourceFiles/mainwindow.cpp @@ -41,7 +41,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "settings/settings_intro.h" #include "platform/platform_notifications_manager.h" #include "base/platform/base_platform_info.h" -#include "base/call_delayed.h" #include "base/variant.h" #include "window/notifications_manager.h" #include "window/themes/window_theme.h" @@ -718,7 +717,7 @@ void MainWindow::handleTrayIconActication( } if (reason == QSystemTrayIcon::Context) { updateTrayMenu(); - base::call_delayed(1, this, [=] { + InvokeQueued(this, [=] { psShowTrayMenu(); }); } else if (!skipTrayClick()) { diff --git a/Telegram/SourceFiles/window/main_window.cpp b/Telegram/SourceFiles/window/main_window.cpp index 0cb156c33f..e1ac04cf82 100644 --- a/Telegram/SourceFiles/window/main_window.cpp +++ b/Telegram/SourceFiles/window/main_window.cpp @@ -25,7 +25,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "main/main_session.h" #include "main/main_session_settings.h" #include "base/crc32hash.h" -#include "base/call_delayed.h" #include "ui/toast/toast.h" #include "ui/widgets/shadow.h" #include "ui/ui_utility.h" @@ -324,7 +323,7 @@ void MainWindow::handleActiveChanged() { if (isActiveWindow()) { Core::App().checkMediaViewActivation(); } - base::call_delayed(1, this, [this] { + InvokeQueued(this, [=] { handleActiveChangedHook(); }); } @@ -343,7 +342,7 @@ void MainWindow::handleVisibleChanged(bool visible) { } void MainWindow::showFromTray() { - base::call_delayed(1, this, [this] { + InvokeQueued(this, [=] { updateGlobalMenu(); }); activate();