OSDN Git Service

PromiseをFutureに変更
authormasakih <masakih@users.sourceforge.jp>
Thu, 12 Jul 2018 12:40:45 +0000 (21:40 +0900)
committermasakih <masakih@users.sourceforge.jp>
Thu, 12 Jul 2018 12:40:45 +0000 (21:40 +0900)
KCD/ScreenshotListViewController.swift

index 0ff3a08..127f478 100644 (file)
@@ -210,12 +210,11 @@ final class ScreenshotListViewController: NSViewController {
     
     private func reloadData() {
         
-        Promise<[ScreenshotInformation]>()
-            .complete {
-                
-                Result(ScreenshotLoader(self.screenshotSaveDirectoryURL).merge(screenshots: []))
+        Future<[ScreenshotInformation]> {
+            
+            ScreenshotLoader(self.screenshotSaveDirectoryURL).merge(screenshots: [])
+            
             }
-            .future
             .onSuccess { screenshots in
                 
                 DispatchQueue.main.async {