mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Don't add views counter when editing media.
This commit is contained in:
parent
70cda17dea
commit
f4455663fc
3 changed files with 10 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
changeViewsCount(edition.views);
|
||||
setForwardsCount(edition.forwards);
|
||||
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…
Add table
Reference in a new issue