mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Closed beta 10019014: New input fields design and animations.
This commit is contained in:
@@ -32,9 +32,31 @@ class ItemBase;
|
||||
} // namespace InlineBots
|
||||
|
||||
namespace App {
|
||||
namespace internal {
|
||||
|
||||
void CallDelayed(int duration, base::lambda<void()> &&lambda);
|
||||
|
||||
} // namespace internal
|
||||
|
||||
template <int N, typename Lambda>
|
||||
inline void CallDelayed(int duration, base::internal::lambda_guard<N, Lambda> &&guarded) {
|
||||
return internal::CallDelayed(duration, [guarded = std_::move(guarded)] { guarded(); });
|
||||
}
|
||||
|
||||
template <typename Pointer, typename ...PointersAndLambda>
|
||||
inline void CallDelayed(int duration, Pointer &&qobject, PointersAndLambda&&... qobjectsAndLambda) {
|
||||
auto guarded = base::lambda_guarded(std_::forward<Pointer>(qobject), std_::forward<PointersAndLambda>(qobjectsAndLambda)...);
|
||||
return CallDelayed(duration, std_::move(guarded));
|
||||
}
|
||||
|
||||
template <typename ...PointersAndLambda>
|
||||
inline base::lambda<void()> LambdaDelayed(int duration, PointersAndLambda&&... qobjectsAndLambda) {
|
||||
auto guarded = base::lambda_guarded(std_::forward<PointersAndLambda>(qobjectsAndLambda)...);
|
||||
return [guarded = std_::move(guarded), duration] {
|
||||
CallDelayed(duration, guarded.clone());
|
||||
};
|
||||
}
|
||||
|
||||
void sendBotCommand(PeerData *peer, UserData *bot, const QString &cmd, MsgId replyTo = 0);
|
||||
bool insertBotCommand(const QString &cmd, bool specialGif = false);
|
||||
void activateBotCommand(const HistoryItem *msg, int row, int col);
|
||||
|
Reference in New Issue
Block a user