mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-05-06 10:09:37 +00:00
Fix spoiler / custom emoji in pinned bar unpause.
This commit is contained in:
parent
cabed9587b
commit
b6ade7ce19
@ -6224,7 +6224,7 @@ void HistoryWidget::checkPinnedBarState() {
|
|||||||
_pinnedBar = std::make_unique<Ui::PinnedBar>(this, [=] {
|
_pinnedBar = std::make_unique<Ui::PinnedBar>(this, [=] {
|
||||||
return controller()->isGifPausedAtLeastFor(
|
return controller()->isGifPausedAtLeastFor(
|
||||||
Window::GifPauseReason::Any);
|
Window::GifPauseReason::Any);
|
||||||
});
|
}, controller()->gifPauseLevelChanged());
|
||||||
auto pinnedRefreshed = Info::Profile::SharedMediaCountValue(
|
auto pinnedRefreshed = Info::Profile::SharedMediaCountValue(
|
||||||
_peer,
|
_peer,
|
||||||
MsgId(0), // topicRootId
|
MsgId(0), // topicRootId
|
||||||
|
@ -442,7 +442,7 @@ void RepliesWidget::setupRootView() {
|
|||||||
_rootView = std::make_unique<Ui::PinnedBar>(this, [=] {
|
_rootView = std::make_unique<Ui::PinnedBar>(this, [=] {
|
||||||
return controller()->isGifPausedAtLeastFor(
|
return controller()->isGifPausedAtLeastFor(
|
||||||
Window::GifPauseReason::Any);
|
Window::GifPauseReason::Any);
|
||||||
});
|
}, controller()->gifPauseLevelChanged());
|
||||||
_rootView->setContent(rpl::combine(
|
_rootView->setContent(rpl::combine(
|
||||||
RootViewContent(
|
RootViewContent(
|
||||||
_history,
|
_history,
|
||||||
@ -1592,7 +1592,7 @@ void RepliesWidget::checkPinnedBarState() {
|
|||||||
_pinnedBar = std::make_unique<Ui::PinnedBar>(this, [=] {
|
_pinnedBar = std::make_unique<Ui::PinnedBar>(this, [=] {
|
||||||
return controller()->isGifPausedAtLeastFor(
|
return controller()->isGifPausedAtLeastFor(
|
||||||
Window::GifPauseReason::Any);
|
Window::GifPauseReason::Any);
|
||||||
});
|
}, controller()->gifPauseLevelChanged());
|
||||||
auto pinnedRefreshed = Info::Profile::SharedMediaCountValue(
|
auto pinnedRefreshed = Info::Profile::SharedMediaCountValue(
|
||||||
_history->peer,
|
_history->peer,
|
||||||
_rootId,
|
_rootId,
|
||||||
|
@ -18,7 +18,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
|
|
||||||
namespace Ui {
|
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))
|
: _wrap(parent, object_ptr<RpWidget>(parent))
|
||||||
, _shadow(std::make_unique<PlainShadow>(_wrap.parentWidget()))
|
, _shadow(std::make_unique<PlainShadow>(_wrap.parentWidget()))
|
||||||
, _customEmojiPaused(std::move(customEmojiPaused)) {
|
, _customEmojiPaused(std::move(customEmojiPaused)) {
|
||||||
@ -30,6 +33,14 @@ PinnedBar::PinnedBar(not_null<QWidget*> parent, Fn<bool()> customEmojiPaused)
|
|||||||
QPainter(_wrap.entity()).fillRect(clip, st::historyPinnedBg);
|
QPainter(_wrap.entity()).fillRect(clip, st::historyPinnedBg);
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
_wrap.setAttribute(Qt::WA_OpaquePaintEvent);
|
_wrap.setAttribute(Qt::WA_OpaquePaintEvent);
|
||||||
|
|
||||||
|
if (customEmojiPausedChanges) {
|
||||||
|
std::move(
|
||||||
|
customEmojiPausedChanges
|
||||||
|
) | rpl::start_with_next([=] {
|
||||||
|
_wrap.entity()->update();
|
||||||
|
}, lifetime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PinnedBar::~PinnedBar() {
|
PinnedBar::~PinnedBar() {
|
||||||
|
@ -22,7 +22,10 @@ class RpWidget;
|
|||||||
|
|
||||||
class PinnedBar final {
|
class PinnedBar final {
|
||||||
public:
|
public:
|
||||||
PinnedBar(not_null<QWidget*> parent, Fn<bool()> customEmojiPaused);
|
PinnedBar(
|
||||||
|
not_null<QWidget*> parent,
|
||||||
|
Fn<bool()> customEmojiPaused,
|
||||||
|
rpl::producer<> customEmojiPausedChanges);
|
||||||
~PinnedBar();
|
~PinnedBar();
|
||||||
|
|
||||||
void show();
|
void show();
|
||||||
|
Loading…
Reference in New Issue
Block a user