mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Don't play interactions in an inactive window.
This commit is contained in:
parent
422bfd973b
commit
d0fcc40d25
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue