mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Removed focus handler for emoji toggle in edit contact box.
This commit is contained in:
@@ -440,7 +440,8 @@ void Controller::setupNotesField() {
|
||||
_box,
|
||||
_window,
|
||||
_emojiPanel.get(),
|
||||
st::sendGifWithCaptionEmojiPosition);
|
||||
st::sendGifWithCaptionEmojiPosition,
|
||||
false);
|
||||
emojiButton->show();
|
||||
|
||||
using Limit = HistoryView::Controls::CharactersLimitLabel;
|
||||
|
||||
@@ -1248,6 +1248,7 @@ historyAttachEmoji: EmojiButton {
|
||||
lineFgOver: historyEmojiCircleFgOver;
|
||||
}
|
||||
boxAttachEmoji: EmojiButton(historyAttachEmoji) {
|
||||
bg: transparent;
|
||||
inner: IconButton(historyAttachEmojiInner) {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
|
||||
@@ -28,7 +28,8 @@ namespace Ui {
|
||||
not_null<Ui::BoxContent*> box,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<ChatHelpers::TabbedPanel*> emojiPanel,
|
||||
QPoint shift) {
|
||||
QPoint shift,
|
||||
bool fadeOnFocusChange) {
|
||||
const auto emojiToggle = Ui::CreateChild<Ui::EmojiButton>(
|
||||
field->parentWidget(),
|
||||
st::defaultComposeFiles.emoji);
|
||||
@@ -47,20 +48,22 @@ namespace Ui {
|
||||
}
|
||||
fade->paint(p);
|
||||
}, fadeTarget->lifetime());
|
||||
rpl::single(false) | rpl::then(
|
||||
field->focusedChanges()
|
||||
) | rpl::on_next([=](bool shown) {
|
||||
crl::on_main(emojiToggle, [=] {
|
||||
if (!emojiToggle->isVisible()) {
|
||||
return;
|
||||
}
|
||||
if (shown) {
|
||||
fade->fadeIn(st::universalDuration);
|
||||
} else {
|
||||
fade->fadeOut(st::universalDuration);
|
||||
}
|
||||
});
|
||||
}, emojiToggle->lifetime());
|
||||
if (fadeOnFocusChange) {
|
||||
rpl::single(false) | rpl::then(
|
||||
field->focusedChanges()
|
||||
) | rpl::on_next([=](bool shown) {
|
||||
crl::on_main(emojiToggle, [=] {
|
||||
if (!emojiToggle->isVisible()) {
|
||||
return;
|
||||
}
|
||||
if (shown) {
|
||||
fade->fadeIn(st::universalDuration);
|
||||
} else {
|
||||
fade->fadeOut(st::universalDuration);
|
||||
}
|
||||
});
|
||||
}, emojiToggle->lifetime());
|
||||
}
|
||||
fade->fadeOut(1);
|
||||
fade->finish();
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ class InputField;
|
||||
not_null<Ui::BoxContent*> box,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<ChatHelpers::TabbedPanel*> emojiPanel,
|
||||
QPoint shift);
|
||||
QPoint shift,
|
||||
bool fadeOnFocusChange = true);
|
||||
|
||||
} // namespace Ui
|
||||
|
||||
Reference in New Issue
Block a user