2017-11-06 18:03:20 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 10:23:14 +00:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2017-11-06 18:03:20 +00:00
|
|
|
|
2018-01-03 10:23:14 +00:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2017-11-06 18:03:20 +00:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2017-12-09 15:13:06 +00:00
|
|
|
namespace Ui {
|
|
|
|
class RpWidget;
|
|
|
|
} // namespace Ui
|
|
|
|
|
2018-01-05 15:57:18 +00:00
|
|
|
namespace Data {
|
|
|
|
class Feed;
|
|
|
|
} // namespace Data
|
|
|
|
|
2017-11-06 18:03:20 +00:00
|
|
|
namespace Window {
|
|
|
|
|
2017-11-07 11:53:05 +00:00
|
|
|
class Controller;
|
|
|
|
|
2017-11-07 15:12:54 +00:00
|
|
|
enum class PeerMenuSource {
|
|
|
|
ChatsList,
|
|
|
|
History,
|
|
|
|
Profile,
|
2017-11-06 18:03:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
using PeerMenuCallback = base::lambda<QAction*(
|
|
|
|
const QString &text,
|
|
|
|
base::lambda<void()> handler)>;
|
|
|
|
|
|
|
|
void FillPeerMenu(
|
2017-11-07 11:53:05 +00:00
|
|
|
not_null<Controller*> controller,
|
2017-11-06 18:03:20 +00:00
|
|
|
not_null<PeerData*> peer,
|
2017-11-07 13:13:41 +00:00
|
|
|
const PeerMenuCallback &addAction,
|
2017-11-07 15:12:54 +00:00
|
|
|
PeerMenuSource source);
|
2018-01-05 15:57:18 +00:00
|
|
|
void FillFeedMenu(
|
|
|
|
not_null<Controller*> controller,
|
|
|
|
not_null<Data::Feed*> feed,
|
|
|
|
const PeerMenuCallback &addAction,
|
|
|
|
PeerMenuSource source);
|
2017-11-06 18:03:20 +00:00
|
|
|
|
2018-02-12 11:10:40 +00:00
|
|
|
void PeerMenuAddMuteAction(
|
|
|
|
not_null<PeerData*> peer,
|
|
|
|
const PeerMenuCallback &addAction);
|
|
|
|
|
2017-11-07 13:13:41 +00:00
|
|
|
void PeerMenuDeleteContact(not_null<UserData*> user);
|
|
|
|
void PeerMenuShareContactBox(not_null<UserData*> user);
|
|
|
|
void PeerMenuAddContact(not_null<UserData*> user);
|
2017-11-19 14:41:52 +00:00
|
|
|
void PeerMenuAddChannelMembers(not_null<ChannelData*> channel);
|
2018-03-06 17:07:42 +00:00
|
|
|
//void PeerMenuUngroupFeed(not_null<Data::Feed*> feed); // #feed
|
2017-11-07 13:13:41 +00:00
|
|
|
|
2018-03-06 17:07:42 +00:00
|
|
|
//void ToggleChannelGrouping(not_null<ChannelData*> channel, bool group); // #feed
|
2017-12-06 14:39:27 +00:00
|
|
|
base::lambda<void()> ClearHistoryHandler(not_null<PeerData*> peer);
|
|
|
|
base::lambda<void()> DeleteAndLeaveHandler(not_null<PeerData*> peer);
|
|
|
|
|
2017-12-09 15:13:06 +00:00
|
|
|
QPointer<Ui::RpWidget> ShowForwardMessagesBox(
|
2017-12-06 10:13:38 +00:00
|
|
|
MessageIdsList &&items,
|
|
|
|
base::lambda_once<void()> &&successCallback = nullptr);
|
|
|
|
|
2017-11-06 18:03:20 +00:00
|
|
|
} // namespace Window
|