2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Actions block done for the new profile implementation.

User block status moved to private data.
Notify::PeerUpdateFlag[s] moved to Notify::PeerUpdate::Flag[s].
This commit is contained in:
John Preston
2016-06-01 23:05:37 +03:00
parent 15d6a1aacf
commit 3fc7cc3453
28 changed files with 647 additions and 179 deletions

View File

@@ -46,21 +46,21 @@ void FinishCallback() {
SmallUpdates.clear();
AllUpdates.clear();
}
ObservedEventRegistrator<PeerUpdateFlags, PeerUpdateHandler> creator(StartCallback, FinishCallback);
ObservedEventRegistrator<PeerUpdate::Flags, PeerUpdateHandler> creator(StartCallback, FinishCallback);
} // namespace
namespace internal {
ConnectionId plainRegisterPeerObserver(PeerUpdateFlags events, PeerUpdateHandler &&handler) {
ConnectionId plainRegisterPeerObserver(PeerUpdate::Flags events, PeerUpdateHandler &&handler) {
return creator.registerObserver(events, std_::forward<PeerUpdateHandler>(handler));
}
} // namespace internal
void mergePeerUpdate(PeerUpdate &mergeTo, const PeerUpdate &mergeFrom) {
if (!(mergeTo.flags & PeerUpdateFlag::NameChanged)) {
if (mergeFrom.flags & PeerUpdateFlag::NameChanged) {
if (!(mergeTo.flags & PeerUpdate::Flag::NameChanged)) {
if (mergeFrom.flags & PeerUpdate::Flag::NameChanged) {
mergeTo.oldNames = mergeFrom.oldNames;
mergeTo.oldNameFirstChars = mergeFrom.oldNameFirstChars;
}