mirror of https://github.com/procxx/kepka.git
Add new calls to Calls log box in realtime.
Also improve button ripple effect in Calls log box.
This commit is contained in:
parent
c4f90983af
commit
28c0e815b3
|
@ -150,6 +150,6 @@ callReDial: IconButton {
|
|||
iconPosition: point(-1px, -1px);
|
||||
|
||||
ripple: defaultRippleAnimation;
|
||||
rippleAreaPosition: point(4px, 12px);
|
||||
rippleAreaSize: 32px;
|
||||
rippleAreaPosition: point(0px, 8px);
|
||||
rippleAreaSize: 40px;
|
||||
}
|
||||
|
|
|
@ -196,6 +196,11 @@ void BoxController::prepare() {
|
|||
view()->refreshRows();
|
||||
}
|
||||
});
|
||||
subscribe(Current().newServiceMessage(), [this](const FullMsgId &msgId) {
|
||||
if (auto item = App::histItemById(msgId)) {
|
||||
insertRow(item, InsertWay::Prepend);
|
||||
}
|
||||
});
|
||||
|
||||
view()->setTitle(lang(lng_call_box_title));
|
||||
view()->addButton(lang(lng_close), [this] { view()->closeBox(); });
|
||||
|
|
|
@ -39,6 +39,10 @@ public:
|
|||
return _currentCallChanged;
|
||||
}
|
||||
|
||||
base::Observable<FullMsgId> &newServiceMessage() {
|
||||
return _newServiceMessage;
|
||||
}
|
||||
|
||||
~Instance();
|
||||
|
||||
private:
|
||||
|
@ -61,6 +65,7 @@ private:
|
|||
std::unique_ptr<Call> _currentCall;
|
||||
std::unique_ptr<Panel> _currentCallPanel;
|
||||
base::Observable<Call*> _currentCallChanged;
|
||||
base::Observable<FullMsgId> _newServiceMessage;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -2809,6 +2809,8 @@ HistoryCall::HistoryCall(HistoryItem *parent, const MTPDmessageActionPhoneCall &
|
|||
_duration = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Calls::Current().newServiceMessage().notify(_parent->fullId());
|
||||
}
|
||||
|
||||
HistoryCall::FinishReason HistoryCall::GetReason(const MTPDmessageActionPhoneCall &call) {
|
||||
|
|
Loading…
Reference in New Issue