SL-20416 Choose emoji floater puts emoji in the chat window that opened it
parent
88b15ff62c
commit
1ef524986f
|
|
@ -273,7 +273,7 @@ BOOL LLFloaterIMSessionTab::postBuild()
|
|||
mEmojiRecentIconsCtrl->setVisible(false);
|
||||
|
||||
mEmojiPickerToggleBtn = getChild<LLButton>("emoji_picker_toggle_btn");
|
||||
mEmojiPickerToggleBtn->setClickedCallback([this](LLUICtrl*, const LLSD&) { onEmojiPickerToggleBtnClicked(this); });
|
||||
mEmojiPickerToggleBtn->setClickedCallback([this](LLUICtrl*, const LLSD&) { onEmojiPickerToggleBtnClicked(); });
|
||||
|
||||
mGearBtn = getChild<LLButton>("gear_btn");
|
||||
mAddBtn = getChild<LLButton>("add_btn");
|
||||
|
|
@ -470,18 +470,18 @@ void LLFloaterIMSessionTab::onEmojiRecentPanelToggleBtnClicked(LLFloaterIMSessio
|
|||
}
|
||||
}
|
||||
|
||||
void LLFloaterIMSessionTab::onEmojiPickerToggleBtnClicked(LLFloaterIMSessionTab* self)
|
||||
void LLFloaterIMSessionTab::onEmojiPickerToggleBtnClicked()
|
||||
{
|
||||
if (LLFloaterEmojiPicker* picker = LLFloaterEmojiPicker::getInstance())
|
||||
{
|
||||
if (!picker->isShown())
|
||||
{
|
||||
picker->show(
|
||||
[self](llwchar emoji) { self->onEmojiPicked(emoji); },
|
||||
[self]() { self->onEmojiPickerClosed(); });
|
||||
if (LLFloater* root_floater = gFloaterView->getParentFloater(self))
|
||||
[](llwchar emoji) { onEmojiPicked(emoji); },
|
||||
[]() { onEmojiPickerClosed(); });
|
||||
if (LLFloaterIMContainer* im_box = LLFloaterIMContainer::findInstance())
|
||||
{
|
||||
root_floater->addDependentFloater(picker, TRUE, TRUE);
|
||||
im_box->addDependentFloater(picker, TRUE, TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -534,15 +534,29 @@ void LLFloaterIMSessionTab::onRecentEmojiPicked(const LLSD& value)
|
|||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterIMSessionTab::onEmojiPicked(llwchar emoji)
|
||||
{
|
||||
mInputEditor->insertEmoji(emoji);
|
||||
mInputEditor->setFocus(TRUE);
|
||||
if (LLFloaterIMContainer* im_box = LLFloaterIMContainer::findInstance())
|
||||
{
|
||||
if (LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(im_box->getSelectedSession()))
|
||||
{
|
||||
session_floater->mInputEditor->insertEmoji(emoji);
|
||||
session_floater->mInputEditor->setFocus(TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterIMSessionTab::onEmojiPickerClosed()
|
||||
{
|
||||
mInputEditor->setFocus(TRUE);
|
||||
if (LLFloaterIMContainer* im_box = LLFloaterIMContainer::findInstance())
|
||||
{
|
||||
if (LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(im_box->getSelectedSession()))
|
||||
{
|
||||
session_floater->mInputEditor->setFocus(TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterIMSessionTab::closeFloater(bool app_quitting)
|
||||
|
|
|
|||
|
|
@ -216,11 +216,11 @@ private:
|
|||
void onInputEditorClicked();
|
||||
|
||||
static void onEmojiRecentPanelToggleBtnClicked(LLFloaterIMSessionTab* self);
|
||||
static void onEmojiPickerToggleBtnClicked(LLFloaterIMSessionTab* self);
|
||||
static void onEmojiPickerToggleBtnClicked();
|
||||
void initEmojiRecentPanel(bool moveFocus);
|
||||
void onRecentEmojiPicked(const LLSD& value);
|
||||
void onEmojiPicked(llwchar emoji);
|
||||
void onEmojiPickerClosed();
|
||||
static void onEmojiPicked(llwchar emoji);
|
||||
static void onEmojiPickerClosed();
|
||||
|
||||
bool checkIfTornOff();
|
||||
bool mIsHostAttached;
|
||||
|
|
|
|||
Loading…
Reference in New Issue