Don't add views counter when editing media.
This commit is contained in:
parent
70cda17dea
commit
f4455663fc
|
@ -469,11 +469,11 @@ void SendConfirmedFile(
|
|||
auto edition = HistoryMessageEdition();
|
||||
edition.isEditHide = (flags & MessageFlag::HideEdited);
|
||||
edition.editDate = 0;
|
||||
edition.views = 0;
|
||||
edition.forwards = 0;
|
||||
edition.ttl = 0;
|
||||
edition.mtpMedia = &media;
|
||||
edition.textWithEntities = caption;
|
||||
edition.useSameViews = true;
|
||||
edition.useSameForwards = true;
|
||||
edition.useSameMarkup = true;
|
||||
edition.useSameReplies = true;
|
||||
edition.useSameReactions = true;
|
||||
|
|
|
@ -1421,8 +1421,12 @@ void HistoryItem::applyEdition(HistoryMessageEdition &&edition) {
|
|||
if (!edition.useSameReactions) {
|
||||
updateReactions(edition.mtpReactions);
|
||||
}
|
||||
if (!edition.useSameViews) {
|
||||
changeViewsCount(edition.views);
|
||||
}
|
||||
if (!edition.useSameForwards) {
|
||||
setForwardsCount(edition.forwards);
|
||||
}
|
||||
setText(_media
|
||||
? edition.textWithEntities
|
||||
: EnsureNonEmpty(edition.textWithEntities));
|
||||
|
|
|
@ -24,6 +24,8 @@ struct HistoryMessageEdition {
|
|||
int views = -1;
|
||||
int forwards = -1;
|
||||
int ttl = 0;
|
||||
bool useSameViews = false;
|
||||
bool useSameForwards = false;
|
||||
bool useSameReplies = false;
|
||||
bool useSameMarkup = false;
|
||||
bool useSameReactions = false;
|
||||
|
|
Loading…
Reference in New Issue