mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Shared media block done in the new profile implementation.
Preparing to call Notify::peerUpdatedSendDelayed() only from event loop.
This commit is contained in:
@@ -65,12 +65,17 @@ void mergePeerUpdate(PeerUpdate &mergeTo, const PeerUpdate &mergeFrom) {
|
||||
mergeTo.oldNameFirstChars = mergeFrom.oldNameFirstChars;
|
||||
}
|
||||
}
|
||||
if (mergeFrom.flags & PeerUpdate::Flag::SharedMediaChanged) {
|
||||
mergeTo.mediaTypesMask |= mergeFrom.mediaTypesMask;
|
||||
}
|
||||
mergeTo.flags |= mergeFrom.flags;
|
||||
}
|
||||
|
||||
void peerUpdatedDelayed(const PeerUpdate &update) {
|
||||
t_assert(creator.started());
|
||||
|
||||
Global::RefHandleDelayedPeerUpdates().call();
|
||||
|
||||
int existingUpdatesCount = SmallUpdates->size();
|
||||
for (int i = 0; i < existingUpdatesCount; ++i) {
|
||||
auto &existingUpdate = (*SmallUpdates)[i];
|
||||
@@ -96,9 +101,9 @@ void peerUpdatedDelayed(const PeerUpdate &update) {
|
||||
}
|
||||
|
||||
void peerUpdatedSendDelayed() {
|
||||
App::emitPeerUpdated();
|
||||
if (!creator.started()) return;
|
||||
|
||||
t_assert(creator.started());
|
||||
App::emitPeerUpdated();
|
||||
|
||||
if (SmallUpdates->isEmpty()) return;
|
||||
|
||||
|
Reference in New Issue
Block a user