mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-01 03:50:43 +00:00
Reload stale video chat on join.
This commit is contained in:
parent
a23561c380
commit
73d00a4caf
@ -1065,6 +1065,7 @@ void GroupCall::start(TimeId scheduleDate, bool rtmp) {
|
|||||||
MTPstring(), // title
|
MTPstring(), // title
|
||||||
MTP_int(scheduleDate)
|
MTP_int(scheduleDate)
|
||||||
)).done([=](const MTPUpdates &result) {
|
)).done([=](const MTPUpdates &result) {
|
||||||
|
_reloadedStaleCall = true;
|
||||||
_acceptFields = true;
|
_acceptFields = true;
|
||||||
_peer->session().api().applyUpdates(result);
|
_peer->session().api().applyUpdates(result);
|
||||||
_acceptFields = false;
|
_acceptFields = false;
|
||||||
@ -1393,6 +1394,13 @@ void GroupCall::rejoin(not_null<PeerData*> as) {
|
|||||||
sendSelfUpdate(SendUpdateType::CameraPaused);
|
sendSelfUpdate(SendUpdateType::CameraPaused);
|
||||||
}
|
}
|
||||||
sendPendingSelfUpdates();
|
sendPendingSelfUpdates();
|
||||||
|
if (!_reloadedStaleCall
|
||||||
|
&& _state.current() != State::Joining) {
|
||||||
|
if (const auto real = lookupReal()) {
|
||||||
|
_reloadedStaleCall = true;
|
||||||
|
real->reloadIfStale();
|
||||||
|
}
|
||||||
|
}
|
||||||
}).fail([=](const MTP::Error &error) {
|
}).fail([=](const MTP::Error &error) {
|
||||||
_joinState.finish();
|
_joinState.finish();
|
||||||
|
|
||||||
|
@ -674,6 +674,7 @@ private:
|
|||||||
bool _hadJoinedState = false;
|
bool _hadJoinedState = false;
|
||||||
bool _listenersHidden = false;
|
bool _listenersHidden = false;
|
||||||
bool _rtmp = false;
|
bool _rtmp = false;
|
||||||
|
bool _reloadedStaleCall = false;
|
||||||
int _rtmpVolume = 0;
|
int _rtmpVolume = 0;
|
||||||
|
|
||||||
std::unique_ptr<Webrtc::MediaDevices> _mediaDevices;
|
std::unique_ptr<Webrtc::MediaDevices> _mediaDevices;
|
||||||
|
Loading…
Reference in New Issue
Block a user