void History::updateSMSState(int callId, HistoryMemento::State state) { HistoryMemento * memento = _collection->getMementoBySMSId(callId); if (memento) { memento->updateState(state); unsigned id = _collection->getMementoId(memento); mementoUpdatedEvent(*this, id); } }
void History::updateCallState(int callId, HistoryMemento::State state) { HistoryMemento * memento = _collection->getMementoByCallId(callId); if (memento) { memento->updateState(state); unsigned id = _collection->getMementoId(memento); mementoUpdatedEvent(*this, id); if (state == HistoryMemento::MissedCall) { _missedCallCount++; unseenMissedCallsChangedEvent(*this, _missedCallCount); } } }