2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Floating dates that appear animated when scrolling messages added.

This commit is contained in:
John Preston
2016-06-10 13:21:09 +03:00
parent 6da62f902b
commit 16429b3008
7 changed files with 303 additions and 85 deletions

View File

@@ -1386,6 +1386,13 @@ public:
bool isAttachedToPrevious() const {
return _flags & MTPDmessage_ClientFlag::f_attach_to_previous;
}
bool displayDate() const {
return Has<HistoryMessageDate>();
}
bool isInOneDayWithPrevious() const {
return !isEmpty() && !displayDate();
}
bool isEmpty() const {
return _text.isEmpty() && !_media;
@@ -1432,7 +1439,7 @@ protected:
// this should be used only in previousItemChanged()
// to add required bits to the Composer mask
// after that always use Has<HistoryMessageDate>()
bool displayDate() const;
void recountDisplayDate();
// this should be used only in previousItemChanged() or when
// HistoryMessageDate or HistoryMessageUnreadBar bit is changed in the Composer mask