mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 23:27:09 +02:00
Don't edit old 'voice chat started' message.
This commit is contained in:
parent
00fac70140
commit
146a9c2794
4 changed files with 0 additions and 34 deletions
|
@ -1842,15 +1842,6 @@ void Updates::feedUpdate(const MTPUpdate &update) {
|
|||
case mtpc_updatePhoneCallSignalingData:
|
||||
case mtpc_updateGroupCallParticipants:
|
||||
case mtpc_updateGroupCall: {
|
||||
if (update.type() == mtpc_updateGroupCall) {
|
||||
const auto &data = update.c_updateGroupCall();
|
||||
if (data.vcall().type() == mtpc_groupCallDiscarded) {
|
||||
const auto &call = data.vcall().c_groupCallDiscarded();
|
||||
session().data().groupCallDiscarded(
|
||||
call.vid().v,
|
||||
call.vduration().v);
|
||||
}
|
||||
}
|
||||
Core::App().calls().handleUpdate(&session(), update);
|
||||
} break;
|
||||
|
||||
|
|
|
@ -814,14 +814,6 @@ void Session::unregisterGroupCall(not_null<GroupCall*> call) {
|
|||
_groupCalls.remove(call->id());
|
||||
}
|
||||
|
||||
rpl::producer<Session::GroupCallDiscard> Session::groupCallDiscards() const {
|
||||
return _groupCallDiscarded.events();
|
||||
}
|
||||
|
||||
void Session::groupCallDiscarded(uint64 id, int duration) {
|
||||
_groupCallDiscarded.fire({ id, duration });
|
||||
}
|
||||
|
||||
GroupCall *Session::groupCall(uint64 callId) const {
|
||||
const auto i = _groupCalls.find(callId);
|
||||
return (i != end(_groupCalls)) ? i->second.get() : nullptr;
|
||||
|
|
|
@ -158,13 +158,6 @@ public:
|
|||
void unregisterGroupCall(not_null<GroupCall*> call);
|
||||
GroupCall *groupCall(uint64 callId) const;
|
||||
|
||||
struct GroupCallDiscard {
|
||||
uint64 id = 0;
|
||||
int duration = 0;
|
||||
};
|
||||
rpl::producer<GroupCallDiscard> groupCallDiscards() const;
|
||||
void groupCallDiscarded(uint64 id, int duration);
|
||||
|
||||
[[nodiscard]] auto invitedToCallUsers(uint64 callId) const
|
||||
-> const base::flat_set<not_null<UserData*>> &;
|
||||
void registerInvitedToCallUser(
|
||||
|
@ -931,7 +924,6 @@ private:
|
|||
|
||||
base::flat_map<uint64, not_null<GroupCall*>> _groupCalls;
|
||||
base::flat_map<uint64, base::flat_set<not_null<UserData*>>> _invitedToCallUsers;
|
||||
rpl::event_stream<GroupCallDiscard> _groupCallDiscarded;
|
||||
|
||||
History *_topPromoted = nullptr;
|
||||
|
||||
|
|
|
@ -935,15 +935,6 @@ void HistoryService::createFromMtp(const MTPDmessageService &message) {
|
|||
const auto id = CallIdFromInput(data.vcall());
|
||||
call->lifetime.destroy();
|
||||
|
||||
history()->owner().groupCallDiscards(
|
||||
) | rpl::filter([=](Data::Session::GroupCallDiscard discard) {
|
||||
return (discard.id == id);
|
||||
}) | rpl::start_with_next([=](
|
||||
Data::Session::GroupCallDiscard discard) {
|
||||
RemoveComponents(HistoryServiceOngoingCall::Bit());
|
||||
updateText(prepareDiscardedCallText(discard.duration));
|
||||
}, call->lifetime);
|
||||
|
||||
const auto peer = history()->peer;
|
||||
const auto has = PeerHasThisCall(peer, id);
|
||||
if (!has.has_value()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue