2
0
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:
John Preston
2016-06-02 16:02:55 +03:00
parent 3fc7cc3453
commit 2c4ec3d9f3
35 changed files with 646 additions and 193 deletions

View File

@@ -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;