mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Fix spoiler / custom emoji in pinned bar unpause.
This commit is contained in:
parent
cabed9587b
commit
b6ade7ce19
4 changed files with 19 additions and 5 deletions
|
@ -6224,7 +6224,7 @@ void HistoryWidget::checkPinnedBarState() {
|
|||
_pinnedBar = std::make_unique<Ui::PinnedBar>(this, [=] {
|
||||
return controller()->isGifPausedAtLeastFor(
|
||||
Window::GifPauseReason::Any);
|
||||
});
|
||||
}, controller()->gifPauseLevelChanged());
|
||||
auto pinnedRefreshed = Info::Profile::SharedMediaCountValue(
|
||||
_peer,
|
||||
MsgId(0), // topicRootId
|
||||
|
|
|
@ -442,7 +442,7 @@ void RepliesWidget::setupRootView() {
|
|||
_rootView = std::make_unique<Ui::PinnedBar>(this, [=] {
|
||||
return controller()->isGifPausedAtLeastFor(
|
||||
Window::GifPauseReason::Any);
|
||||
});
|
||||
}, controller()->gifPauseLevelChanged());
|
||||
_rootView->setContent(rpl::combine(
|
||||
RootViewContent(
|
||||
_history,
|
||||
|
@ -1592,7 +1592,7 @@ void RepliesWidget::checkPinnedBarState() {
|
|||
_pinnedBar = std::make_unique<Ui::PinnedBar>(this, [=] {
|
||||
return controller()->isGifPausedAtLeastFor(
|
||||
Window::GifPauseReason::Any);
|
||||
});
|
||||
}, controller()->gifPauseLevelChanged());
|
||||
auto pinnedRefreshed = Info::Profile::SharedMediaCountValue(
|
||||
_history->peer,
|
||||
_rootId,
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue