From 839feed32961fc4b99bc242bfc4d4996b6d4f1e9 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Mon, 8 Apr 2019 20:05:31 +0300 Subject: [PATCH] Added delay for clicked callback of edit media button. --- Telegram/SourceFiles/boxes/edit_caption_box.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/boxes/edit_caption_box.cpp b/Telegram/SourceFiles/boxes/edit_caption_box.cpp index 1cc730683..ca47fa50f 100644 --- a/Telegram/SourceFiles/boxes/edit_caption_box.cpp +++ b/Telegram/SourceFiles/boxes/edit_caption_box.cpp @@ -522,7 +522,10 @@ void EditCaptionBox::createEditMediaButton() { // Create edit media button. _editMedia.create(this, st::editMediaButton); updateEditMediaButton(); - _editMedia->setClickedCallback(buttonCallback); + _editMedia->setClickedCallback( + App::LambdaDelayed(st::historyAttach.ripple.hideDuration, this, [=] { + buttonCallback(); + })); } void EditCaptionBox::prepare() {