Pair the uploaded media edit's shared media removal

Task: 2026/08/19/pair-media-edit-removal-with-index-add
This commit is contained in:
John Preston
2026-08-19 14:42:36 +04:00
committed by 23rd
parent e44457662a
commit 6b40ae943f
2 changed files with 1 additions and 1 deletions

View File

@@ -411,6 +411,7 @@ void EditMessageWithUploadedMedia(
if (item) {
item->removeFromSharedMediaIndex();
item->clearSavedMedia();
item->addToSharedMediaIndex();
item->setIsLocalUpdateMedia(true);
applyUpdates();
item->setIsLocalUpdateMedia(false);

View File

@@ -2691,7 +2691,6 @@ void HistoryItem::applySentMessage(const MTPDmessage &data) {
setPostAuthor(data.vpost_author().value_or_empty());
contributeToSlowmode(data.vdate().v);
if (isRegular()
&& !isLocalUpdateMedia()
&& (topicRootId() != wasTopicRootId
|| sublistPeerId() != wasSublistPeerId)) {
if (wasTypes) {