mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix chat preview and new emoji interactions.
This commit is contained in:
parent
cde70b9807
commit
363b700f1f
3 changed files with 12 additions and 1 deletions
|
@ -129,6 +129,7 @@ private:
|
||||||
void listAddTranslatedItems(
|
void listAddTranslatedItems(
|
||||||
not_null<TranslateTracker*> tracker) override;
|
not_null<TranslateTracker*> tracker) override;
|
||||||
not_null<Window::SessionController*> listWindow() override;
|
not_null<Window::SessionController*> listWindow() override;
|
||||||
|
not_null<QWidget*> listEmojiInteractionsParent() override;
|
||||||
not_null<const Ui::ChatStyle*> listChatStyle() override;
|
not_null<const Ui::ChatStyle*> listChatStyle() override;
|
||||||
rpl::producer<bool> listChatWideValue() override;
|
rpl::producer<bool> listChatWideValue() override;
|
||||||
std::unique_ptr<Reactions::Manager> listMakeReactionsManager(
|
std::unique_ptr<Reactions::Manager> listMakeReactionsManager(
|
||||||
|
@ -676,6 +677,10 @@ not_null<Window::SessionController*> Item::listWindow() {
|
||||||
Unexpected("Item::listWindow.");
|
Unexpected("Item::listWindow.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
not_null<QWidget*> Item::listEmojiInteractionsParent() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
not_null<const Ui::ChatStyle*> Item::listChatStyle() {
|
not_null<const Ui::ChatStyle*> Item::listChatStyle() {
|
||||||
return _chatStyle.get();
|
return _chatStyle.get();
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,6 +101,10 @@ not_null<Window::SessionController*> WindowListDelegate::listWindow() {
|
||||||
return _window;
|
return _window;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
not_null<QWidget*> WindowListDelegate::listEmojiInteractionsParent() {
|
||||||
|
return _window->content();
|
||||||
|
}
|
||||||
|
|
||||||
not_null<const Ui::ChatStyle*> WindowListDelegate::listChatStyle() {
|
not_null<const Ui::ChatStyle*> WindowListDelegate::listChatStyle() {
|
||||||
return _window->chatStyle();
|
return _window->chatStyle();
|
||||||
}
|
}
|
||||||
|
@ -376,7 +380,7 @@ ListWidget::ListWidget(
|
||||||
, _session(session)
|
, _session(session)
|
||||||
, _emojiInteractions(std::make_unique<EmojiInteractions>(
|
, _emojiInteractions(std::make_unique<EmojiInteractions>(
|
||||||
this,
|
this,
|
||||||
_delegate->listWindow()->content(),
|
_delegate->listEmojiInteractionsParent(),
|
||||||
session,
|
session,
|
||||||
[=](not_null<const Element*> view) { return itemTop(view); }))
|
[=](not_null<const Element*> view) { return itemTop(view); }))
|
||||||
, _context(_delegate->listContext())
|
, _context(_delegate->listContext())
|
||||||
|
|
|
@ -161,6 +161,7 @@ public:
|
||||||
|
|
||||||
// Methods that use Window::SessionController by default.
|
// Methods that use Window::SessionController by default.
|
||||||
virtual not_null<Window::SessionController*> listWindow() = 0;
|
virtual not_null<Window::SessionController*> listWindow() = 0;
|
||||||
|
virtual not_null<QWidget*> listEmojiInteractionsParent() = 0;
|
||||||
virtual not_null<const Ui::ChatStyle*> listChatStyle() = 0;
|
virtual not_null<const Ui::ChatStyle*> listChatStyle() = 0;
|
||||||
virtual rpl::producer<bool> listChatWideValue() = 0;
|
virtual rpl::producer<bool> listChatWideValue() = 0;
|
||||||
virtual std::unique_ptr<Reactions::Manager> listMakeReactionsManager(
|
virtual std::unique_ptr<Reactions::Manager> listMakeReactionsManager(
|
||||||
|
@ -194,6 +195,7 @@ public:
|
||||||
explicit WindowListDelegate(not_null<Window::SessionController*> window);
|
explicit WindowListDelegate(not_null<Window::SessionController*> window);
|
||||||
|
|
||||||
not_null<Window::SessionController*> listWindow() override;
|
not_null<Window::SessionController*> listWindow() override;
|
||||||
|
not_null<QWidget*> listEmojiInteractionsParent() override;
|
||||||
not_null<const Ui::ChatStyle*> listChatStyle() override;
|
not_null<const Ui::ChatStyle*> listChatStyle() override;
|
||||||
rpl::producer<bool> listChatWideValue() override;
|
rpl::producer<bool> listChatWideValue() override;
|
||||||
std::unique_ptr<Reactions::Manager> listMakeReactionsManager(
|
std::unique_ptr<Reactions::Manager> listMakeReactionsManager(
|
||||||
|
|
Loading…
Add table
Reference in a new issue