diff --git a/Riot/AppDelegate.m b/Riot/AppDelegate.m index 8932a4f48..6f27ab28f 100644 --- a/Riot/AppDelegate.m +++ b/Riot/AppDelegate.m @@ -657,13 +657,10 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni { NSLog(@"[AppDelegate] applicationDidBecomeActive"); - if ([PinCodePreferences shared].isPinSet && [MXKAccountManager sharedManager].activeAccounts.count > 0 && appLastActiveDate) + if ([PinCodePreferences shared].isPinSet && [MXKAccountManager sharedManager].activeAccounts.count > 0) { // check should show the pinpad - NSDate *now = [NSDate new]; - NSTimeInterval inactiveTimeInterval = [now timeIntervalSinceDate:appLastActiveDate]; - - if (inactiveTimeInterval > [PinCodePreferences shared].graceTimeInSeconds) + if (appLastActiveDate == nil || [[NSDate new] timeIntervalSinceDate:appLastActiveDate] > [PinCodePreferences shared].graceTimeInSeconds) { if (self.setPinCoordinatorBridgePresenter) { diff --git a/Riot/Modules/SetPinCode/EnterPinCode/EnterPinCodeViewController.storyboard b/Riot/Modules/SetPinCode/EnterPinCode/EnterPinCodeViewController.storyboard index d043cde29..55cc37051 100644 --- a/Riot/Modules/SetPinCode/EnterPinCode/EnterPinCodeViewController.storyboard +++ b/Riot/Modules/SetPinCode/EnterPinCode/EnterPinCodeViewController.storyboard @@ -1,6 +1,6 @@ - + @@ -13,24 +13,24 @@ - + - + - + - + - + @@ -57,14 +57,14 @@ - + - + @@ -80,7 +80,7 @@ - + @@ -91,19 +91,19 @@ - +