Commit d5f0eddd authored by Soomin Lee's avatar Soomin Lee

CloudServices: Post NewFileAdded notification

parent adf0381c
...@@ -302,6 +302,9 @@ ...@@ -302,6 +302,9 @@
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];
// FIXME: Replace notifications by cleaner observers
[[NSNotificationCenter defaultCenter] postNotificationName:NSNotification.VLCNewFileAddedNotification
object:self];
if ([self.delegate respondsToSelector:@selector(operationWithProgressInformationStopped)]) if ([self.delegate respondsToSelector:@selector(operationWithProgressInformationStopped)])
[self.delegate operationWithProgressInformationStopped]; [self.delegate operationWithProgressInformationStopped];
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#import "VLCActivityManager.h" #import "VLCActivityManager.h"
#import "VLCMediaFileDiscoverer.h" #import "VLCMediaFileDiscoverer.h"
#import "VLCDropboxConstants.h" #import "VLCDropboxConstants.h"
#import "VLC-Swift.h"
@interface VLCDropboxController () @interface VLCDropboxController ()
...@@ -243,6 +244,9 @@ ...@@ -243,6 +244,9 @@
[self.delegate operationWithProgressInformationStopped]; [self.delegate operationWithProgressInformationStopped];
} }
// FIXME: Replace notifications by cleaner observers
[[NSNotificationCenter defaultCenter] postNotificationName:NSNotification.VLCNewFileAddedNotification
object:self];
self.downloadInProgress = NO; self.downloadInProgress = NO;
[self _triggerNextDownload]; [self _triggerNextDownload];
if (networkError) { if (networkError) {
......
...@@ -356,6 +356,9 @@ ...@@ -356,6 +356,9 @@
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];
// FIXME: Replace notifications by cleaner observers
[[NSNotificationCenter defaultCenter] postNotificationName:NSNotification.VLCNewFileAddedNotification
object:self];
if ([self.delegate respondsToSelector:@selector(operationWithProgressInformationStopped)]) if ([self.delegate respondsToSelector:@selector(operationWithProgressInformationStopped)])
[self.delegate operationWithProgressInformationStopped]; [self.delegate operationWithProgressInformationStopped];
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
#import "LiveApiHelper.h" #import "LiveApiHelper.h"
#import "LiveAuthStorage.h" #import "LiveAuthStorage.h"
#import "VLC-Swift.h"
@interface VLCOneDriveController () <LiveAuthDelegate, VLCOneDriveObjectDelegate, VLCOneDriveObjectDownloadDelegate> @interface VLCOneDriveController () <LiveAuthDelegate, VLCOneDriveObjectDelegate, VLCOneDriveObjectDownloadDelegate>
{ {
LiveConnectClient *_liveClient; LiveConnectClient *_liveClient;
...@@ -267,6 +269,9 @@ ...@@ -267,6 +269,9 @@
if ([self.delegate respondsToSelector:@selector(operationWithProgressInformationStopped)]) if ([self.delegate respondsToSelector:@selector(operationWithProgressInformationStopped)])
[self.delegate operationWithProgressInformationStopped]; [self.delegate operationWithProgressInformationStopped];
// FIXME: Replace notifications by cleaner observers
[[NSNotificationCenter defaultCenter] postNotificationName:NSNotification.VLCNewFileAddedNotification
object:self];
_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