瀏覽代碼

AppDelegate: Move HTTPUploaderController clean

Soomin Lee 7 年之前
父節點
當前提交
9a85b73777
共有 3 個文件被更改,包括 5 次插入3 次删除
  1. 4 0
      Sources/Coordinators/AppCoordinator.swift
  2. 0 3
      Sources/VLCAppDelegate.m
  3. 1 0
      VLC-iOS-Bridging-Header.h

+ 4 - 0
Sources/Coordinators/AppCoordinator.swift

@@ -27,6 +27,10 @@ class Services: NSObject {
         self.playerController = VLCPlayerDisplayController(services: services)
         super.init()
         setupPlayerController()
+
+        // Init the HTTP Server and clean its cache
+        // FIXME: VLCHTTPUploaderController should perhaps be a service?
+        VLCHTTPUploaderController.sharedInstance().cleanCache()
     }
 
     private func setupPlayerController() {

+ 0 - 3
Sources/VLCAppDelegate.m

@@ -97,9 +97,6 @@
 
     [VLCApperanceManager setupAppearanceWithTheme:PresentationTheme.current];
 
-    // Init the HTTP Server and clean its cache
-    [[VLCHTTPUploaderController sharedInstance] cleanCache];
-
     self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
     rootViewController = [UITabBarController new];
     self.window.rootViewController = rootViewController;

+ 1 - 0
VLC-iOS-Bridging-Header.h

@@ -26,3 +26,4 @@
 #import "IASKSettingsTableViewController+Protected.h"
 #import "IASKSettingsReader.h"
 #import "IASKSwitch.h"
+#import "VLCHTTPUploaderController.h"