Avoid redundant media reloads (#6763)

* Avoid redundant reloads on media viewer

* Add changelog
This commit is contained in:
ismailgulek
2022-09-26 14:56:15 +03:00
committed by GitHub
parent 1dcaeaece8
commit db2bccc7be
2 changed files with 6 additions and 0 deletions
@@ -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;