Commit 534663d0 authored by Soomin Lee's avatar Soomin Lee
Browse files

Cloud services: Add guard for tvOS

parent ea40016a
...@@ -302,10 +302,11 @@ ...@@ -302,10 +302,11 @@
APLog(@"BoxFile download was successful"); APLog(@"BoxFile download was successful");
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, NSLocalizedString(@"GDRIVE_DOWNLOAD_SUCCESSFUL", nil)); UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, NSLocalizedString(@"GDRIVE_DOWNLOAD_SUCCESSFUL", nil));
[[VLCMediaFileDiscoverer sharedInstance] performSelectorOnMainThread:@selector(updateMediaList) withObject:nil waitUntilDone:NO]; [[VLCMediaFileDiscoverer sharedInstance] performSelectorOnMainThread:@selector(updateMediaList) withObject:nil waitUntilDone:NO];
#if TARGET_OS_IOS
// FIXME: Replace notifications by cleaner observers // FIXME: Replace notifications by cleaner observers
[[NSNotificationCenter defaultCenter] postNotificationName:NSNotification.VLCNewFileAddedNotification [[NSNotificationCenter defaultCenter] postNotificationName:NSNotification.VLCNewFileAddedNotification
object:self]; object:self];
#endif
if ([self.delegate respondsToSelector:@selector(operationWithProgressInformationStopped)]) if ([self.delegate respondsToSelector:@selector(operationWithProgressInformationStopped)])
[self.delegate operationWithProgressInformationStopped]; [self.delegate operationWithProgressInformationStopped];
_downloadInProgress = NO; _downloadInProgress = NO;
......
...@@ -17,7 +17,10 @@ ...@@ -17,7 +17,10 @@
#import "VLCActivityManager.h" #import "VLCActivityManager.h"
#import "VLCMediaFileDiscoverer.h" #import "VLCMediaFileDiscoverer.h"
#import "VLCDropboxConstants.h" #import "VLCDropboxConstants.h"
#import "VLC-Swift.h"
#if TARGET_OS_IOS
# import "VLC-Swift.h"
#endif
@interface VLCDropboxController () @interface VLCDropboxController ()
...@@ -244,9 +247,11 @@ ...@@ -244,9 +247,11 @@
[self.delegate operationWithProgressInformationStopped]; [self.delegate operationWithProgressInformationStopped];
} }
#if TARGET_OS_IOS
// FIXME: Replace notifications by cleaner observers // FIXME: Replace notifications by cleaner observers
[[NSNotificationCenter defaultCenter] postNotificationName:NSNotification.VLCNewFileAddedNotification [[NSNotificationCenter defaultCenter] postNotificationName:NSNotification.VLCNewFileAddedNotification
object:self]; object:self];
#endif
self.downloadInProgress = NO; self.downloadInProgress = NO;
[self _triggerNextDownload]; [self _triggerNextDownload];
if (networkError) { if (networkError) {
......
...@@ -356,10 +356,11 @@ ...@@ -356,10 +356,11 @@
APLog(@"DriveFile download was successful"); APLog(@"DriveFile download was successful");
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, NSLocalizedString(@"GDRIVE_DOWNLOAD_SUCCESSFUL", nil)); UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, NSLocalizedString(@"GDRIVE_DOWNLOAD_SUCCESSFUL", nil));
[[VLCMediaFileDiscoverer sharedInstance] performSelectorOnMainThread:@selector(updateMediaList) withObject:nil waitUntilDone:NO]; [[VLCMediaFileDiscoverer sharedInstance] performSelectorOnMainThread:@selector(updateMediaList) withObject:nil waitUntilDone:NO];
#if TARGET_OS_IOS
// FIXME: Replace notifications by cleaner observers // FIXME: Replace notifications by cleaner observers
[[NSNotificationCenter defaultCenter] postNotificationName:NSNotification.VLCNewFileAddedNotification [[NSNotificationCenter defaultCenter] postNotificationName:NSNotification.VLCNewFileAddedNotification
object:self]; object:self];
#endif
if ([self.delegate respondsToSelector:@selector(operationWithProgressInformationStopped)]) if ([self.delegate respondsToSelector:@selector(operationWithProgressInformationStopped)])
[self.delegate operationWithProgressInformationStopped]; [self.delegate operationWithProgressInformationStopped];
_downloadInProgress = NO; _downloadInProgress = NO;
......
...@@ -21,7 +21,9 @@ ...@@ -21,7 +21,9 @@
#import "LiveApiHelper.h" #import "LiveApiHelper.h"
#import "LiveAuthStorage.h" #import "LiveAuthStorage.h"
#import "VLC-Swift.h" #if TARGET_OS_IOS
# import "VLC-Swift.h"
#endif
@interface VLCOneDriveController () <LiveAuthDelegate, VLCOneDriveObjectDelegate, VLCOneDriveObjectDownloadDelegate> @interface VLCOneDriveController () <LiveAuthDelegate, VLCOneDriveObjectDelegate, VLCOneDriveObjectDownloadDelegate>
{ {
...@@ -269,10 +271,12 @@ ...@@ -269,10 +271,12 @@
if ([self.delegate respondsToSelector:@selector(operationWithProgressInformationStopped)]) if ([self.delegate respondsToSelector:@selector(operationWithProgressInformationStopped)])
[self.delegate operationWithProgressInformationStopped]; [self.delegate operationWithProgressInformationStopped];
#if TARGET_OS_IOS
// FIXME: Replace notifications by cleaner observers // FIXME: Replace notifications by cleaner observers
[[NSNotificationCenter defaultCenter] postNotificationName:NSNotification.VLCNewFileAddedNotification [[NSNotificationCenter defaultCenter] postNotificationName:NSNotification.VLCNewFileAddedNotification
object:self]; object:self];
#endif
_downloadInProgress = NO; _downloadInProgress = NO;
[self _triggerNextDownload]; [self _triggerNextDownload];
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment