mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-28 19:40:54 +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
|
||||
MTP_int(scheduleDate)
|
||||
)).done([=](const MTPUpdates &result) {
|
||||
_reloadedStaleCall = true;
|
||||
_acceptFields = true;
|
||||
_peer->session().api().applyUpdates(result);
|
||||
_acceptFields = false;
|
||||
@ -1393,6 +1394,13 @@ void GroupCall::rejoin(not_null<PeerData*> as) {
|
||||
sendSelfUpdate(SendUpdateType::CameraPaused);
|
||||
}
|
||||
sendPendingSelfUpdates();
|
||||
if (!_reloadedStaleCall
|
||||
&& _state.current() != State::Joining) {
|
||||
if (const auto real = lookupReal()) {
|
||||
_reloadedStaleCall = true;
|
||||
real->reloadIfStale();
|
||||
}
|
||||
}
|
||||
}).fail([=](const MTP::Error &error) {
|
||||
_joinState.finish();
|
||||
|
||||
|
@ -674,6 +674,7 @@ private:
|
||||
bool _hadJoinedState = false;
|
||||
bool _listenersHidden = false;
|
||||
bool _rtmp = false;
|
||||
bool _reloadedStaleCall = false;
|
||||
int _rtmpVolume = 0;
|
||||
|
||||
std::unique_ptr<Webrtc::MediaDevices> _mediaDevices;
|
||||
|
Loading…
Reference in New Issue
Block a user