Merge branch 'charlesmchen/loadViewVsScreenLock'

pull/1/head
Matthew Chen 7 years ago
commit 6ccce6754c

@ -50,7 +50,7 @@ public class LoadingViewController: UIViewController {
var isShowingTopLabel = false
var isShowingBottomLabel = false
override public func viewDidAppear(_ animated: Bool) {
override public func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
// We only show the "loading" UI if it's a slow launch. Otherwise this ViewController

@ -130,8 +130,9 @@ NS_ASSUME_NONNULL_BEGIN
[self observeNotifications];
// Default to screen protection until we know otherwise.
[self updateScreenBlockingWindow:ScreenLockUIStateScreenProtection animated:NO];
// Hide the screen blocking window until "app is ready" to
// avoid blocking the loading view.
[self updateScreenBlockingWindow:ScreenLockUIStateNone animated:NO];
// Initialize the screen lock state.
//

@ -76,6 +76,8 @@ NSString *NSStringForScreenLockUIState(ScreenLockUIState value)
self.screenBlockingImageView = imageView;
self.screenBlockingButton = button;
[self updateUIWithState:ScreenLockUIStateScreenProtection isLogoAtTop:NO animated:NO];
}
// The "screen blocking" window has three possible states:
@ -89,6 +91,10 @@ NSString *NSStringForScreenLockUIState(ScreenLockUIState value)
{
OWSAssertIsOnMainThread();
if (!self.isViewLoaded) {
return;
}
BOOL shouldShowBlockWindow = uiState != ScreenLockUIStateNone;
BOOL shouldHaveScreenLock = uiState == ScreenLockUIStateScreenLock;

Loading…
Cancel
Save