mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 14:17:45 +00:00
Don't play interactions in an inactive window.
This commit is contained in:
@@ -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);
|
||||||
|
Reference in New Issue
Block a user