mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Disable video preview in Settings when in group call.
This commit is contained in:
parent
38cb1b195d
commit
fef1f80570
1 changed files with 10 additions and 4 deletions
|
@ -154,7 +154,9 @@ void Calls::setupContent() {
|
||||||
track->renderNextFrame(
|
track->renderNextFrame(
|
||||||
) | rpl::start_with_next([=] {
|
) | rpl::start_with_next([=] {
|
||||||
const auto size = track->frameSize();
|
const auto size = track->frameSize();
|
||||||
if (size.isEmpty() || Core::App().calls().currentCall()) {
|
if (size.isEmpty()
|
||||||
|
|| Core::App().calls().currentCall()
|
||||||
|
|| Core::App().calls().currentGroupCall()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto width = bubbleWrap->width();
|
const auto width = bubbleWrap->width();
|
||||||
|
@ -166,9 +168,13 @@ void Calls::setupContent() {
|
||||||
bubbleWrap->update();
|
bubbleWrap->update();
|
||||||
}, bubbleWrap->lifetime());
|
}, bubbleWrap->lifetime());
|
||||||
|
|
||||||
Core::App().calls().currentCallValue(
|
using namespace rpl::mappers;
|
||||||
) | rpl::start_with_next([=](::Calls::Call *value) {
|
rpl::combine(
|
||||||
if (value) {
|
Core::App().calls().currentCallValue(),
|
||||||
|
Core::App().calls().currentGroupCallValue(),
|
||||||
|
_1 || _2
|
||||||
|
) | rpl::start_with_next([=](bool has) {
|
||||||
|
if (has) {
|
||||||
track->setState(VideoState::Inactive);
|
track->setState(VideoState::Inactive);
|
||||||
bubbleWrap->resize(bubbleWrap->width(), 0);
|
bubbleWrap->resize(bubbleWrap->width(), 0);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue