mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Optimize confcall join process.
This commit is contained in:
@@ -1554,6 +1554,11 @@ void GroupCall::rejoin(not_null<PeerData*> as) {
|
||||
).arg(_joinState.payload.ssrc));
|
||||
if (!_conferenceCall && _migratedConferenceInfo) {
|
||||
startConference();
|
||||
} else if (_conferenceCall
|
||||
&& !_conferenceCall->blockchainMayBeEmpty()
|
||||
&& !_e2e->hasLastBlock0()) {
|
||||
//sendJoinRequest(); AssertIsDebug();
|
||||
refreshLastBlockAndJoin();
|
||||
} else {
|
||||
sendJoinRequest();
|
||||
}
|
||||
|
||||
@@ -135,6 +135,10 @@ bool GroupCall::listenersHidden() const {
|
||||
return _listenersHidden;
|
||||
}
|
||||
|
||||
bool GroupCall::blockchainMayBeEmpty() const {
|
||||
return _version < 2;
|
||||
}
|
||||
|
||||
not_null<PeerData*> GroupCall::peer() const {
|
||||
return _peer;
|
||||
}
|
||||
|
||||
@@ -78,6 +78,7 @@ public:
|
||||
[[nodiscard]] bool rtmp() const;
|
||||
[[nodiscard]] bool canManage() const;
|
||||
[[nodiscard]] bool listenersHidden() const;
|
||||
[[nodiscard]] bool blockchainMayBeEmpty() const;
|
||||
[[nodiscard]] not_null<PeerData*> peer() const;
|
||||
[[nodiscard]] MTPInputGroupCall input() const;
|
||||
[[nodiscard]] QString title() const {
|
||||
|
||||
@@ -102,6 +102,10 @@ PublicKey Call::myKey() const {
|
||||
return _myKey;
|
||||
}
|
||||
|
||||
bool Call::hasLastBlock0() const {
|
||||
return _lastBlock0.has_value();
|
||||
}
|
||||
|
||||
void Call::refreshLastBlock0(std::optional<Block> block) {
|
||||
_lastBlock0 = std::move(block);
|
||||
}
|
||||
|
||||
@@ -95,6 +95,7 @@ public:
|
||||
[[nodiscard]] QByteArray emojiHash() const;
|
||||
[[nodiscard]] rpl::producer<QByteArray> emojiHashValue() const;
|
||||
|
||||
[[nodiscard]] bool hasLastBlock0() const;
|
||||
void refreshLastBlock0(std::optional<Block> block);
|
||||
[[nodiscard]] Block makeJoinBlock();
|
||||
[[nodiscard]] Block makeRemoveBlock(const base::flat_set<UserId> &ids);
|
||||
|
||||
Vendored
+1
-1
Submodule Telegram/ThirdParty/tgcalls updated: fd1cfbd815...7f04d5360f
Reference in New Issue
Block a user