Fix duplicated entries in calls log box.

Notify about new call service messages only for unread messages.
This commit is contained in:
John Preston 2017-07-15 15:24:32 +03:00
parent 397e1dde78
commit ab62b1591f
2 changed files with 5 additions and 2 deletions

View File

@ -35,6 +35,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "observer_peer.h"
#include "auth_session.h"
#include "window/notifications_manager.h"
#include "calls/calls_instance.h"
namespace {
@ -1008,6 +1009,10 @@ HistoryItem *History::createItem(const MTPMessage &msg, bool applyServiceAction,
if (App::main()) emit App::main()->peerUpdated(result->history()->peer);
}
} break;
case mtpc_messageActionPhoneCall: {
Calls::Current().newServiceMessage().notify(result->fullId());
} break;
}
}
} break;

View File

@ -3075,8 +3075,6 @@ HistoryCall::HistoryCall(gsl::not_null<HistoryItem*> parent, const MTPDmessageAc
_duration = 0;
}
}
Calls::Current().newServiceMessage().notify(_parent->fullId());
}
HistoryCall::FinishReason HistoryCall::GetReason(const MTPDmessageActionPhoneCall &call) {