mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-22 00:57:09 +02:00
Apply date edition in service messages.
This commit is contained in:
parent
4875f0b003
commit
2054b73c3c
3 changed files with 10 additions and 0 deletions
|
@ -195,6 +195,14 @@ TimeId HistoryItem::NewMessageDate(TimeId scheduled) {
|
|||
return scheduled ? scheduled : base::unixtime::now();
|
||||
}
|
||||
|
||||
void HistoryItem::applyServiceDateEdition(const MTPDmessageService &data) {
|
||||
const auto date = data.vdate().v;
|
||||
if (_date == date) {
|
||||
return;
|
||||
}
|
||||
_date = date;
|
||||
}
|
||||
|
||||
void HistoryItem::finishEdition(int oldKeyboardTop) {
|
||||
_history->owner().requestItemViewRefresh(this);
|
||||
invalidateChatListEntry();
|
||||
|
|
|
@ -416,6 +416,7 @@ protected:
|
|||
virtual void markMediaAsReadHook() {
|
||||
}
|
||||
|
||||
void applyServiceDateEdition(const MTPDmessageService &data);
|
||||
void finishEdition(int oldKeyboardTop);
|
||||
void finishEditionToEmpty();
|
||||
|
||||
|
|
|
@ -1045,6 +1045,7 @@ void HistoryService::applyEdition(const MTPDmessageService &message) {
|
|||
UpdateComponents(0);
|
||||
|
||||
createFromMtp(message);
|
||||
applyServiceDateEdition(message);
|
||||
|
||||
if (message.vaction().type() == mtpc_messageActionHistoryClear) {
|
||||
removeMedia();
|
||||
|
|
Loading…
Add table
Reference in a new issue