2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Replace base::lambda with shorter term.

base::lambda -> Fn (type alias for std::function).
base::lambda_once -> FnMut (type alias for base::unique_function).
base::lambda_guarded -> crl::guard.
base::lambda_call_type_t -> crl::deduced_call_type.
This commit is contained in:
John Preston
2018-06-04 18:35:11 +03:00
parent 8d1cdea31a
commit dd81f5d59f
216 changed files with 792 additions and 1455 deletions

View File

@@ -63,10 +63,10 @@ public:
//void toggleChannelGrouping( // #feed
// not_null<ChannelData*> channel,
// bool group,
// base::lambda<void()> callback);
// Fn<void()> callback);
//void ungroupAllFromFeed(not_null<Data::Feed*> feed);
using RequestMessageDataCallback = base::lambda<void(ChannelData*, MsgId)>;
using RequestMessageDataCallback = Fn<void(ChannelData*, MsgId)>;
void requestMessageData(
ChannelData *channel,
MsgId msgId,
@@ -92,15 +92,15 @@ public:
void requestChangelog(
const QString &sinceVersion,
base::lambda<void(const MTPUpdates &result)> callback);
Fn<void(const MTPUpdates &result)> callback);
void refreshProxyPromotion();
void requestDeepLinkInfo(
const QString &path,
base::lambda<void(const MTPDhelp_deepLinkInfo &result)> callback);
Fn<void(const MTPDhelp_deepLinkInfo &result)> callback);
void requestChannelMembersForAdd(
not_null<ChannelData*> channel,
base::lambda<void(const MTPchannels_ChannelParticipants&)> callback);
Fn<void(const MTPchannels_ChannelParticipants&)> callback);
void processFullPeer(PeerData *peer, const MTPmessages_ChatFull &result);
void processFullPeer(UserData *user, const MTPUserFull &result);
@@ -206,17 +206,17 @@ public:
void parseChannelParticipants(
not_null<ChannelData*> channel,
const MTPchannels_ChannelParticipants &result,
base::lambda<void(
Fn<void(
int availableCount,
const QVector<MTPChannelParticipant> &list)> callbackList,
base::lambda<void()> callbackNotModified = nullptr);
Fn<void()> callbackNotModified = nullptr);
void parseRecentChannelParticipants(
not_null<ChannelData*> channel,
const MTPchannels_ChannelParticipants &result,
base::lambda<void(
Fn<void(
int availableCount,
const QVector<MTPChannelParticipant> &list)> callbackList,
base::lambda<void()> callbackNotModified = nullptr);
Fn<void()> callbackNotModified = nullptr);
struct SendOptions {
SendOptions(not_null<History*> history) : history(history) {
@@ -235,7 +235,7 @@ public:
void forwardMessages(
HistoryItemsList &&items,
const SendOptions &options,
base::lambda_once<void()> &&successCallback = nullptr);
FnMut<void()> &&successCallback = nullptr);
void shareContact(
const QString &phone,
const QString &firstName,
@@ -462,11 +462,11 @@ private:
ChannelData *_channelMembersForAdd = nullptr;
mtpRequestId _channelMembersForAddRequestId = 0;
base::lambda<void(
Fn<void(
const MTPchannels_ChannelParticipants&)> _channelMembersForAddCallback;
base::flat_map<
not_null<ChannelData*>,
std::pair<mtpRequestId,base::lambda<void()>>> _channelGroupingRequests;
std::pair<mtpRequestId,Fn<void()>>> _channelGroupingRequests;
using KickRequest = std::pair<
not_null<ChannelData*>,