2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-25 03:47:08 +00:00

50 lines
1.2 KiB
C
Raw Normal View History

2015-12-07 16:05:00 +03:00
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
2015-12-07 16:05:00 +03:00
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
2015-12-07 16:05:00 +03:00
*/
#pragma once
2017-04-06 17:38:10 +03:00
#include "base/type_traits.h"
2019-09-26 13:55:35 +03:00
#include "base/call_delayed.h"
2019-11-13 17:12:04 +03:00
#include "mtproto/mtproto_proxy_data.h"
class History;
namespace Main {
class Session;
} // namespace Main
2021-07-27 02:45:01 +03:00
namespace Window {
class SessionController;
} // namespace Window
2015-12-07 16:05:00 +03:00
namespace App {
template <typename Guard, typename Lambda>
[[nodiscard]] inline auto LambdaDelayed(int duration, Guard &&object, Lambda &&lambda) {
auto guarded = crl::guard(
std::forward<Guard>(object),
std::forward<Lambda>(lambda));
return [saved = std::move(guarded), duration] {
auto copy = saved;
2019-09-26 13:55:35 +03:00
base::call_delayed(duration, std::move(copy));
};
}
} // namespace App
2015-12-07 16:05:00 +03:00
namespace Ui {
// Legacy global methods.
2015-12-07 21:09:05 +03:00
2020-06-10 22:08:17 +04:00
void showPeerHistory(not_null<const PeerData*> peer, MsgId msgId);
void showPeerHistory(not_null<const History*> history, MsgId msgId);
void showChatsList(not_null<Main::Session*> session);
bool skipPaintEvent(QWidget *widget, QPaintEvent *event);
} // namespace Ui