ソースを参照

fixed preview ordering

nayooti 5 年 前
コミット
5b54ba6d76
1 ファイル変更3 行追加3 行削除
  1. 3 3
      deltachat-ios/Controller/GalleryViewController.swift

+ 3 - 3
deltachat-ios/Controller/GalleryViewController.swift

@@ -188,10 +188,10 @@ extension GalleryViewController {
         guard let url = msg.fileURL, let index = mediaMessageIds.index(of: msgId) else {
             return
         }
-        let previousUrls: [URL] = msg.previousMediaURLs()
-        let nextUrls: [URL] = msg.nextMediaURLs()
+        let olderUrls: [URL] = msg.previousMediaURLs().reversed()
+        let newerUrls: [URL] = msg.nextMediaURLs().reversed()
         // these are the files user will be able to swipe trough
-        let mediaUrls: [URL] = previousUrls + [url] + nextUrls
+        let mediaUrls: [URL] = newerUrls + [url] + olderUrls
         let previewController = PreviewController(currentIndex: index, urls: mediaUrls)
         present(previewController, animated: true, completion: nil)
     }