Don't play interactions in an inactive window.
This commit is contained in:
parent
422bfd973b
commit
d0fcc40d25
|
@ -202,7 +202,8 @@ HistoryInner::HistoryInner(
|
||||||
using PlayRequest = ChatHelpers::EmojiInteractionPlayRequest;
|
using PlayRequest = ChatHelpers::EmojiInteractionPlayRequest;
|
||||||
_controller->emojiInteractions().playRequests(
|
_controller->emojiInteractions().playRequests(
|
||||||
) | rpl::filter([=](const PlayRequest &request) {
|
) | rpl::filter([=](const PlayRequest &request) {
|
||||||
return (request.item->history() == _history);
|
return (request.item->history() == _history)
|
||||||
|
&& _controller->widget()->isActive();
|
||||||
}) | rpl::start_with_next([=](PlayRequest &&request) {
|
}) | rpl::start_with_next([=](PlayRequest &&request) {
|
||||||
if (const auto view = request.item->mainView()) {
|
if (const auto view = request.item->mainView()) {
|
||||||
_emojiInteractions->play(std::move(request), view);
|
_emojiInteractions->play(std::move(request), view);
|
||||||
|
|
Loading…
Reference in New Issue