2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Load unknown participants by source.

This commit is contained in:
John Preston
2020-11-29 18:18:51 +03:00
parent cf8e45ab61
commit e66ad89a2a
3 changed files with 105 additions and 25 deletions

View File

@@ -10,6 +10,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
class UserData;
class ChannelData;
class ApiWrap;
namespace Data {
class GroupCall final {
@@ -60,12 +62,20 @@ public:
[[nodiscard]] bool canChangeJoinMuted() const;
private:
enum class ApplySliceSource {
SliceLoaded,
UnknownLoaded,
UpdateReceived,
};
[[nodiscard]] ApiWrap &api() const;
void applyCall(const MTPGroupCall &call, bool force);
void applyParticipantsSlice(
const QVector<MTPGroupCallParticipant> &list,
bool sendIndividualUpdates = false);
ApplySliceSource sliceSource);
void applyParticipantsMutes(
const MTPDupdateGroupCallParticipants &update);
void requestUnknownSources();
const not_null<ChannelData*> _channel;
const uint64 _id = 0;
@@ -80,6 +90,9 @@ private:
QString _nextOffset;
rpl::variable<int> _fullCount = 0;
base::flat_map<uint32, crl::time> _unknownSpokenSources;
mtpRequestId _unknownSourcesRequestId = 0;
rpl::event_stream<ParticipantUpdate> _participantUpdates;
rpl::event_stream<> _participantsSliceAdded;