mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fixed display edited badge in scheduled albums.
Moved hideEditedBadge from HistoryMessage to HistoryItem.
This commit is contained in:
parent
816f422e21
commit
64aa5480ad
3 changed files with 7 additions and 6 deletions
|
@ -227,6 +227,9 @@ public:
|
|||
[[nodiscard]] bool hasFailed() const {
|
||||
return _flags & MessageFlag::SendingFailed;
|
||||
}
|
||||
[[nodiscard]] bool hideEditedBadge() const {
|
||||
return (_flags & MessageFlag::HideEdited);
|
||||
}
|
||||
void sendFailed();
|
||||
[[nodiscard]] virtual int viewsCount() const {
|
||||
return hasViews() ? 1 : -1;
|
||||
|
|
|
@ -128,10 +128,6 @@ public:
|
|||
[[nodiscard]] bool allowsEdit(TimeId now) const override;
|
||||
[[nodiscard]] bool uploading() const;
|
||||
|
||||
[[nodiscard]] bool hideEditedBadge() const {
|
||||
return (_flags & MessageFlag::HideEdited);
|
||||
}
|
||||
|
||||
void setViewsCount(int count) override;
|
||||
void setForwardsCount(int count) override;
|
||||
void setReplies(HistoryMessageRepliesData &&data) override;
|
||||
|
|
|
@ -638,8 +638,10 @@ DocumentData *GroupedMedia::getDocument() const {
|
|||
|
||||
HistoryMessageEdited *GroupedMedia::displayedEditBadge() const {
|
||||
for (const auto &part : _parts) {
|
||||
if (const auto edited = part.item->Get<HistoryMessageEdited>()) {
|
||||
return edited;
|
||||
if (!part.item->hideEditedBadge()) {
|
||||
if (const auto edited = part.item->Get<HistoryMessageEdited>()) {
|
||||
return edited;
|
||||
}
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
|
|
Loading…
Add table
Reference in a new issue