mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Fix spoiler / custom emoji in pinned bar unpause.
This commit is contained in:
@@ -18,7 +18,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
namespace Ui {
|
||||
|
||||
PinnedBar::PinnedBar(not_null<QWidget*> parent, Fn<bool()> customEmojiPaused)
|
||||
PinnedBar::PinnedBar(
|
||||
not_null<QWidget*> parent,
|
||||
Fn<bool()> customEmojiPaused,
|
||||
rpl::producer<> customEmojiPausedChanges)
|
||||
: _wrap(parent, object_ptr<RpWidget>(parent))
|
||||
, _shadow(std::make_unique<PlainShadow>(_wrap.parentWidget()))
|
||||
, _customEmojiPaused(std::move(customEmojiPaused)) {
|
||||
@@ -30,6 +33,14 @@ PinnedBar::PinnedBar(not_null<QWidget*> parent, Fn<bool()> customEmojiPaused)
|
||||
QPainter(_wrap.entity()).fillRect(clip, st::historyPinnedBg);
|
||||
}, lifetime());
|
||||
_wrap.setAttribute(Qt::WA_OpaquePaintEvent);
|
||||
|
||||
if (customEmojiPausedChanges) {
|
||||
std::move(
|
||||
customEmojiPausedChanges
|
||||
) | rpl::start_with_next([=] {
|
||||
_wrap.entity()->update();
|
||||
}, lifetime());
|
||||
}
|
||||
}
|
||||
|
||||
PinnedBar::~PinnedBar() {
|
||||
|
@@ -22,7 +22,10 @@ class RpWidget;
|
||||
|
||||
class PinnedBar final {
|
||||
public:
|
||||
PinnedBar(not_null<QWidget*> parent, Fn<bool()> customEmojiPaused);
|
||||
PinnedBar(
|
||||
not_null<QWidget*> parent,
|
||||
Fn<bool()> customEmojiPaused,
|
||||
rpl::producer<> customEmojiPausedChanges);
|
||||
~PinnedBar();
|
||||
|
||||
void show();
|
||||
|
Reference in New Issue
Block a user