2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Replace base/task_queue with crl.

This commit is contained in:
John Preston
2017-12-31 00:28:38 +03:00
parent ae7e5be5cd
commit af552fb4c0
21 changed files with 135 additions and 604 deletions

View File

@@ -24,7 +24,6 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "platform/linux/linux_libnotify.h"
#include "platform/linux/linux_libs.h"
#include "lang/lang_keys.h"
#include "base/task_queue.h"
namespace Platform {
namespace Notifications {
@@ -203,10 +202,9 @@ private:
MsgId msgId = 0;
};
static void performOnMainQueue(NotificationDataStruct *data, base::lambda_once<void(Manager *manager)> task) {
base::TaskQueue::Main().Put([weak = data->weak, task = std::move(task)]() mutable {
if (auto strong = weak.lock()) {
task(*strong);
}
const auto weak = data->weak;
crl::on_main(weak, [=, task = std::move(task)]() mutable {
task(*weak.lock());
});
}
static void notificationDataFree(gpointer data) {