From 77008443d4f9a67241857af8d4a8b7e96cd18caa Mon Sep 17 00:00:00 2001 From: ryanzhao Date: Fri, 4 Jun 2021 15:59:59 +1000 Subject: [PATCH] fix the issue that the last image is missing in media detail screen --- .../Media Viewing & Editing/MediaGalleryViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Session/Media Viewing & Editing/MediaGalleryViewController.swift b/Session/Media Viewing & Editing/MediaGalleryViewController.swift index 093289508..dfe8413d5 100644 --- a/Session/Media Viewing & Editing/MediaGalleryViewController.swift +++ b/Session/Media Viewing & Editing/MediaGalleryViewController.swift @@ -630,7 +630,7 @@ class MediaGallery: NSObject, MediaGalleryDataSource, MediaTileViewControllerDel // To keep it simple, this isn't exactly *amount* sized if `message` window overlaps the end or // beginning of the view. Still, we have sufficient buffer to fetch more as the user swipes. let start: Int = initialIndex - Int(amount) / 2 - let end: Int = initialIndex + Int(amount) / 2 + let end: Int = initialIndex + Int(amount) / 2 + 1 return start..