mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-10 05:33:50 +00:00
Send sticker from set box to correct place.
This commit is contained in:
@@ -20,6 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "window/window_chat_switch_process.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_filters_menu.h"
|
||||
#include "window/section_widget.h"
|
||||
#include "window/window_separate_id.h"
|
||||
#include "info/channel_statistics/earn/info_channel_earn_list.h"
|
||||
#include "info/peer_gifts/info_peer_gifts_widget.h"
|
||||
@@ -297,6 +298,9 @@ SendMenu::Details MainWindowShow::sendMenuDetails() const {
|
||||
if (!window) {
|
||||
return SendMenu::Details();
|
||||
}
|
||||
if (const auto section = window->activeLayerSection()) {
|
||||
return section->sendMenuDetails();
|
||||
}
|
||||
return window->content()->sendMenuDetails();
|
||||
}
|
||||
|
||||
@@ -318,7 +322,11 @@ void MainWindowShow::processChosenSticker(
|
||||
ChatHelpers::FileChosen &&chosen) const {
|
||||
if (const auto window = _window.get()) {
|
||||
Ui::PostponeCall(window, [=, chosen = std::move(chosen)]() mutable {
|
||||
window->stickerOrEmojiChosen(std::move(chosen));
|
||||
if (const auto section = window->activeLayerSection()) {
|
||||
section->processChosenSticker(std::move(chosen));
|
||||
} else {
|
||||
window->content()->processChosenSticker(std::move(chosen));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -3120,6 +3128,20 @@ bool SessionController::isLayerShown() const {
|
||||
return _window->isLayerShown();
|
||||
}
|
||||
|
||||
void SessionController::registerActiveLayerSection(SectionWidget *section) {
|
||||
_activeLayerSection = section;
|
||||
}
|
||||
|
||||
void SessionController::unregisterActiveLayerSection(SectionWidget *section) {
|
||||
if (_activeLayerSection == section) {
|
||||
_activeLayerSection = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
SectionWidget *SessionController::activeLayerSection() const {
|
||||
return _activeLayerSection.data();
|
||||
}
|
||||
|
||||
not_null<MainWidget*> SessionController::content() const {
|
||||
return widget()->sessionContent();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user