mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Fix animation glitch in blocking window.
This commit is contained in:
parent
df685da497
commit
115235d1b4
3 changed files with 22 additions and 10 deletions
|
@ -514,10 +514,6 @@ const UIWindowLevel UIWindowLevel_Background = -1.f;
|
||||||
|
|
||||||
UIView *rootView = self.screenBlockingViewController.view;
|
UIView *rootView = self.screenBlockingViewController.view;
|
||||||
|
|
||||||
[NSLayoutConstraint deactivateConstraints:self.screenBlockingConstraints];
|
|
||||||
|
|
||||||
NSMutableArray<NSLayoutConstraint *> *screenBlockingConstraints = [NSMutableArray new];
|
|
||||||
|
|
||||||
BOOL shouldHaveScreenLock = desiredUIState == ScreenLockUIStateScreenLock;
|
BOOL shouldHaveScreenLock = desiredUIState == ScreenLockUIStateScreenLock;
|
||||||
NSString *signature = [NSString stringWithFormat:@"%d %d", shouldHaveScreenLock, self.isShowingScreenLockUI];
|
NSString *signature = [NSString stringWithFormat:@"%d %d", shouldHaveScreenLock, self.isShowingScreenLockUI];
|
||||||
if ([NSObject isNullableObject:self.screenBlockingSignature equalTo:signature]) {
|
if ([NSObject isNullableObject:self.screenBlockingSignature equalTo:signature]) {
|
||||||
|
@ -525,6 +521,10 @@ const UIWindowLevel UIWindowLevel_Background = -1.f;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[NSLayoutConstraint deactivateConstraints:self.screenBlockingConstraints];
|
||||||
|
|
||||||
|
NSMutableArray<NSLayoutConstraint *> *screenBlockingConstraints = [NSMutableArray new];
|
||||||
|
|
||||||
self.screenBlockingButton.hidden = !shouldHaveScreenLock;
|
self.screenBlockingButton.hidden = !shouldHaveScreenLock;
|
||||||
|
|
||||||
if (self.isShowingScreenLockUI) {
|
if (self.isShowingScreenLockUI) {
|
||||||
|
|
|
@ -118,6 +118,8 @@ CGFloat ScaleFromIPhone5(CGFloat iPhone5Value);
|
||||||
- (void)addRedBorderRecursively;
|
- (void)addRedBorderRecursively;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
- (void)logFrame;
|
||||||
|
- (void)logFrameWithLabel:(NSString *)label;
|
||||||
- (void)logFrameLater;
|
- (void)logFrameLater;
|
||||||
- (void)logFrameLaterWithLabel:(NSString *)label;
|
- (void)logFrameLaterWithLabel:(NSString *)label;
|
||||||
- (void)logHierarchyUpwardLaterWithLabel:(NSString *)label;
|
- (void)logHierarchyUpwardLaterWithLabel:(NSString *)label;
|
||||||
|
|
|
@ -452,6 +452,21 @@ CGFloat ScaleFromIPhone5(CGFloat iPhone5Value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)logFrame
|
||||||
|
{
|
||||||
|
[self logFrameWithLabel:@""];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)logFrameWithLabel:(NSString *)label
|
||||||
|
{
|
||||||
|
DDLogVerbose(@"%@ %@ frame: %@, hidden: %d, opacity: %f",
|
||||||
|
self.logTag,
|
||||||
|
label,
|
||||||
|
NSStringFromCGRect(self.frame),
|
||||||
|
self.hidden,
|
||||||
|
self.layer.opacity);
|
||||||
|
}
|
||||||
|
|
||||||
- (void)logFrameLater
|
- (void)logFrameLater
|
||||||
{
|
{
|
||||||
[self logFrameLaterWithLabel:@""];
|
[self logFrameLaterWithLabel:@""];
|
||||||
|
@ -460,12 +475,7 @@ CGFloat ScaleFromIPhone5(CGFloat iPhone5Value)
|
||||||
- (void)logFrameLaterWithLabel:(NSString *)label
|
- (void)logFrameLaterWithLabel:(NSString *)label
|
||||||
{
|
{
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
DDLogVerbose(@"%@ %@ frame: %@, hidden: %d, opacity: %f",
|
[self logFrameWithLabel:label];
|
||||||
self.logTag,
|
|
||||||
label,
|
|
||||||
NSStringFromCGRect(self.frame),
|
|
||||||
self.hidden,
|
|
||||||
self.layer.opacity);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue