|
@@ -45,6 +45,11 @@
|
|
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
|
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+- (void)willShow
|
|
|
|
+{
|
|
|
|
+ [self filterCloudStorageCellsWithAnimation:NO];
|
|
|
|
+}
|
|
|
|
+
|
|
- (void)settingDidChange:(NSNotification*)notification
|
|
- (void)settingDidChange:(NSNotification*)notification
|
|
{
|
|
{
|
|
if ([notification.object isEqual:kVLCSettingPasscodeOnKey]) {
|
|
if ([notification.object isEqual:kVLCSettingPasscodeOnKey]) {
|
|
@@ -58,6 +63,18 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+- (void) filterCloudStorageCellsWithAnimation:(BOOL)shouldAnimate
|
|
|
|
+{
|
|
|
|
+ NSMutableSet * hideKeys = [[NSMutableSet alloc] init];
|
|
|
|
+ if (![[DBSession sharedSession] isLinked]) {
|
|
|
|
+ [hideKeys addObject:@"UnlinkDropbox"];
|
|
|
|
+ }
|
|
|
|
+ if (![[VLCGoogleDriveController sharedInstance] isAuthorized]) {
|
|
|
|
+ [hideKeys addObject:@"UnlinkGoogleDrive"];
|
|
|
|
+ }
|
|
|
|
+ [self.viewController setHiddenKeys:hideKeys animated:shouldAnimate];
|
|
|
|
+}
|
|
|
|
+
|
|
- (void)settingsViewControllerDidEnd:(IASKAppSettingsViewController*)sender
|
|
- (void)settingsViewControllerDidEnd:(IASKAppSettingsViewController*)sender
|
|
{
|
|
{
|
|
[[(VLCAppDelegate*)[UIApplication sharedApplication].delegate revealController] toggleSidebar:![(VLCAppDelegate*)[UIApplication sharedApplication].delegate revealController].sidebarShowing duration:kGHRevealSidebarDefaultAnimationDuration];
|
|
[[(VLCAppDelegate*)[UIApplication sharedApplication].delegate revealController] toggleSidebar:![(VLCAppDelegate*)[UIApplication sharedApplication].delegate revealController].sidebarShowing duration:kGHRevealSidebarDefaultAnimationDuration];
|
|
@@ -100,6 +117,7 @@
|
|
cancelButtonTitle:NSLocalizedString(@"BUTTON_DONE", @"")
|
|
cancelButtonTitle:NSLocalizedString(@"BUTTON_DONE", @"")
|
|
otherButtonTitles:nil];
|
|
otherButtonTitles:nil];
|
|
[alert show];
|
|
[alert show];
|
|
|
|
+ [self filterCloudStorageCellsWithAnimation:YES];
|
|
_currentUnlinkDialogTitle = nil;
|
|
_currentUnlinkDialogTitle = nil;
|
|
_currentCloudName = nil;
|
|
_currentCloudName = nil;
|
|
}
|
|
}
|