2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 00:55:12 +00:00

Add group calls top bar.

This commit is contained in:
John Preston
2020-11-24 17:40:10 +03:00
parent 8833d3e45b
commit 41591ff2e9
10 changed files with 136 additions and 36 deletions

View File

@@ -682,10 +682,14 @@ void ChannelData::setCall(const MTPInputGroupCall &call) {
clearCall();
return;
}
if (_call) {
owner().unregisterGroupCall(_call.get());
}
_call = std::make_unique<Data::GroupCall>(
this,
data.vid().v,
data.vaccess_hash().v);
owner().registerGroupCall(_call.get());
session().changes().peerUpdated(this, UpdateFlag::GroupCall);
});
}
@@ -694,6 +698,7 @@ void ChannelData::clearCall() {
if (!_call) {
return;
}
owner().unregisterGroupCall(_call.get());
_call = nullptr;
session().changes().peerUpdated(this, UpdateFlag::GroupCall);
}