mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 15:43:55 +02:00
Optimize confcall join process.
This commit is contained in:
parent
c72cf46db7
commit
042f51e58f
6 changed files with 16 additions and 1 deletions
|
@ -1554,6 +1554,11 @@ void GroupCall::rejoin(not_null<PeerData*> as) {
|
||||||
).arg(_joinState.payload.ssrc));
|
).arg(_joinState.payload.ssrc));
|
||||||
if (!_conferenceCall && _migratedConferenceInfo) {
|
if (!_conferenceCall && _migratedConferenceInfo) {
|
||||||
startConference();
|
startConference();
|
||||||
|
} else if (_conferenceCall
|
||||||
|
&& !_conferenceCall->blockchainMayBeEmpty()
|
||||||
|
&& !_e2e->hasLastBlock0()) {
|
||||||
|
//sendJoinRequest(); AssertIsDebug();
|
||||||
|
refreshLastBlockAndJoin();
|
||||||
} else {
|
} else {
|
||||||
sendJoinRequest();
|
sendJoinRequest();
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,6 +135,10 @@ bool GroupCall::listenersHidden() const {
|
||||||
return _listenersHidden;
|
return _listenersHidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GroupCall::blockchainMayBeEmpty() const {
|
||||||
|
return _version < 2;
|
||||||
|
}
|
||||||
|
|
||||||
not_null<PeerData*> GroupCall::peer() const {
|
not_null<PeerData*> GroupCall::peer() const {
|
||||||
return _peer;
|
return _peer;
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,6 +78,7 @@ public:
|
||||||
[[nodiscard]] bool rtmp() const;
|
[[nodiscard]] bool rtmp() const;
|
||||||
[[nodiscard]] bool canManage() const;
|
[[nodiscard]] bool canManage() const;
|
||||||
[[nodiscard]] bool listenersHidden() const;
|
[[nodiscard]] bool listenersHidden() const;
|
||||||
|
[[nodiscard]] bool blockchainMayBeEmpty() const;
|
||||||
[[nodiscard]] not_null<PeerData*> peer() const;
|
[[nodiscard]] not_null<PeerData*> peer() const;
|
||||||
[[nodiscard]] MTPInputGroupCall input() const;
|
[[nodiscard]] MTPInputGroupCall input() const;
|
||||||
[[nodiscard]] QString title() const {
|
[[nodiscard]] QString title() const {
|
||||||
|
|
|
@ -102,6 +102,10 @@ PublicKey Call::myKey() const {
|
||||||
return _myKey;
|
return _myKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Call::hasLastBlock0() const {
|
||||||
|
return _lastBlock0.has_value();
|
||||||
|
}
|
||||||
|
|
||||||
void Call::refreshLastBlock0(std::optional<Block> block) {
|
void Call::refreshLastBlock0(std::optional<Block> block) {
|
||||||
_lastBlock0 = std::move(block);
|
_lastBlock0 = std::move(block);
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,6 +95,7 @@ public:
|
||||||
[[nodiscard]] QByteArray emojiHash() const;
|
[[nodiscard]] QByteArray emojiHash() const;
|
||||||
[[nodiscard]] rpl::producer<QByteArray> emojiHashValue() const;
|
[[nodiscard]] rpl::producer<QByteArray> emojiHashValue() const;
|
||||||
|
|
||||||
|
[[nodiscard]] bool hasLastBlock0() const;
|
||||||
void refreshLastBlock0(std::optional<Block> block);
|
void refreshLastBlock0(std::optional<Block> block);
|
||||||
[[nodiscard]] Block makeJoinBlock();
|
[[nodiscard]] Block makeJoinBlock();
|
||||||
[[nodiscard]] Block makeRemoveBlock(const base::flat_set<UserId> &ids);
|
[[nodiscard]] Block makeRemoveBlock(const base::flat_set<UserId> &ids);
|
||||||
|
|
2
Telegram/ThirdParty/tgcalls
vendored
2
Telegram/ThirdParty/tgcalls
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit fd1cfbd8151b2c32d5471a4f5431faa6274ce421
|
Subproject commit 7f04d5360f3208d032dffdf634c8ff9c508da2f1
|
Loading…
Add table
Reference in a new issue