2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Show user as active when in call panel.

This commit is contained in:
John Preston
2020-12-08 21:06:56 +04:00
parent d6ab9347c1
commit 5fe8c0ed7e
7 changed files with 32 additions and 2 deletions

View File

@@ -455,6 +455,17 @@ void Instance::destroyCurrentCall() {
}
}
bool Instance::hasActivePanel(not_null<Main::Session*> session) const {
if (inCall()) {
return (&_currentCall->user()->session() == session)
&& _currentCallPanel->isActive();
} else if (inGroupCall()) {
return (&_currentGroupCall->channel()->session() == session)
&& _currentGroupCallPanel->isActive();
}
return false;
}
bool Instance::activateCurrentCall() {
if (inCall()) {
_currentCallPanel->showAndActivate();