瀏覽代碼

Fix passcode issues by updating the UI to validated state in -[VLCAppDelegate validatePasscode] when no passcode is set. Be more defensive about -[VLCKeychainCoordinate validatePasscode] calls when a passcode was never set => nil.

Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
Felix Kühne 9 年之前
父節點
當前提交
d7b5c73b3a
共有 3 個文件被更改,包括 5 次插入2 次删除
  1. 1 0
      NEWS
  2. 3 1
      Sources/VLCAppDelegate.m
  3. 1 1
      Sources/VLCKeychainCoordinator.m

+ 1 - 0
NEWS

@@ -3,6 +3,7 @@
 * Improved SMB compatibility
 * UPnP reliability improvements, notably with Kodi
 * Stability improvements
+* Fixed issues unlocking the app when a passcode was never set
 
 2.7.0:
 ------

+ 3 - 1
Sources/VLCAppDelegate.m

@@ -438,8 +438,10 @@ didFailToContinueUserActivityWithType:(NSString *)userActivityType
         [[VLCPlayerDisplayController sharedInstance] dismissPlaybackView];
 
         [keychainCoordinator validatePasscode];
-    } else
+    } else {
         _passcodeValidated = YES;
+        [self passcodeValidated];
+    }
 }
 
 #pragma mark - download handling

+ 1 - 1
Sources/VLCKeychainCoordinator.m

@@ -115,7 +115,7 @@ NSString *const VLCPasscode = @"org.videolan.vlc-ios.passcode";
     _inValidation = YES;
 
     NSString *passcode = [self _obtainPasscode];
-    if ([passcode isEqualToString:@""]) {
+    if (passcode == nil || [passcode isEqualToString:@""]) {
         [[NSNotificationCenter defaultCenter] postNotificationName:VLCPasscodeValidated object:self];
     }