diff --git a/Riot/Modules/Room/Attachements/MXKAttachmentsViewController.m b/Riot/Modules/Room/Attachements/MXKAttachmentsViewController.m index 37759b261..331121341 100644 --- a/Riot/Modules/Room/Attachements/MXKAttachmentsViewController.m +++ b/Riot/Modules/Room/Attachements/MXKAttachmentsViewController.m @@ -346,6 +346,11 @@ - (void)displayAttachments:(NSArray*)attachmentArray focusOn:(NSString*)eventId { + if ([attachmentArray isEqualToArray:attachments] && eventId.length == 0) + { + // neither the attachments nor the focus changed, can be ignored + return; + } NSString *currentAttachmentEventId = eventId; NSString *currentAttachmentOriginalFileName = nil; diff --git a/changelog.d/6717.bugfix b/changelog.d/6717.bugfix new file mode 100644 index 000000000..c3cc45ae3 --- /dev/null +++ b/changelog.d/6717.bugfix @@ -0,0 +1 @@ +Media: Avoid redundant reloads on media viewer.