mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 17:30:12 +00:00
Fix overlay status check
This commit is contained in:
parent
f3849e5769
commit
6f8759c501
@ -92,13 +92,13 @@ private final class OverlayStatusControllerNode: ViewControllerTracingNode {
|
|||||||
case .success:
|
case .success:
|
||||||
self.contentController = .progress(ProgressWindowController(light: style == .light))
|
self.contentController = .progress(ProgressWindowController(light: style == .light))
|
||||||
case let .shieldSuccess(text, increasedDelay):
|
case let .shieldSuccess(text, increasedDelay):
|
||||||
self.contentController = .shieldSuccess(ProxyWindowController(light: style == .light, text: text, icon: ProxyWindowController.generateShieldImage(style == .light), isShield: true), increasedDelay)
|
self.contentController = .shieldSuccess(ProxyWindowController(light: style == .light, text: text, icon: ProxyWindowController.generateShieldImage(style == .light), isShield: true, showCheck: true), increasedDelay)
|
||||||
case let .genericSuccess(text, increasedDelay):
|
case let .genericSuccess(text, increasedDelay):
|
||||||
let controller = ProxyWindowController(light: style == .light, text: text, icon: nil, isShield: false)!
|
let controller = ProxyWindowController(light: style == .light, text: text, icon: nil, isShield: false, showCheck: true)!
|
||||||
self.contentController = .genericSuccess(controller, increasedDelay)
|
self.contentController = .genericSuccess(controller, increasedDelay)
|
||||||
isUserInteractionEnabled = false
|
isUserInteractionEnabled = false
|
||||||
case let .starSuccess(text):
|
case let .starSuccess(text):
|
||||||
self.contentController = .genericSuccess(ProxyWindowController(light: style == .light, text: text, icon: UIImage(bundleImageName: "Star"), isShield: false), false)
|
self.contentController = .genericSuccess(ProxyWindowController(light: style == .light, text: text, icon: UIImage(bundleImageName: "Star"), isShield: false, showCheck: false), false)
|
||||||
}
|
}
|
||||||
|
|
||||||
super.init()
|
super.init()
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
@interface ProxyWindowController : UIViewController
|
@interface ProxyWindowController : UIViewController
|
||||||
|
|
||||||
- (instancetype)initWithLight:(bool)light text:(NSString *)text icon:(UIImage *)icon isShield:(bool)isShield;
|
- (instancetype)initWithLight:(bool)light text:(NSString *)text icon:(UIImage *)icon isShield:(bool)isShield showCheck:(bool)showCheck;
|
||||||
|
|
||||||
- (void)dismissWithSuccess:(void (^)(void))completion increasedDelay:(bool)increasedDelay;
|
- (void)dismissWithSuccess:(void (^)(void))completion increasedDelay:(bool)increasedDelay;
|
||||||
- (void)updateLayout;
|
- (void)updateLayout;
|
||||||
|
|||||||
@ -135,6 +135,7 @@ static bool ProxyWindowIsLight = true;
|
|||||||
NSString *_text;
|
NSString *_text;
|
||||||
UIImage *_icon;
|
UIImage *_icon;
|
||||||
bool _isShield;
|
bool _isShield;
|
||||||
|
bool _showCheck;
|
||||||
UIVisualEffectView *_effectView;
|
UIVisualEffectView *_effectView;
|
||||||
UIView *_backgroundView;
|
UIView *_backgroundView;
|
||||||
ProxySpinnerView *_spinner;
|
ProxySpinnerView *_spinner;
|
||||||
@ -168,13 +169,14 @@ static bool ProxyWindowIsLight = true;
|
|||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype)initWithLight:(bool)light text:(NSString *)text icon:(UIImage *)icon isShield:(bool)isShield {
|
- (instancetype)initWithLight:(bool)light text:(NSString *)text icon:(UIImage *)icon isShield:(bool)isShield showCheck:(bool)showCheck {
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if (self != nil) {
|
if (self != nil) {
|
||||||
_light = light;
|
_light = light;
|
||||||
_text = text;
|
_text = text;
|
||||||
_icon = icon;
|
_icon = icon;
|
||||||
_isShield = isShield;
|
_isShield = isShield;
|
||||||
|
_showCheck = showCheck;
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
@ -316,7 +318,7 @@ static bool ProxyWindowIsLight = true;
|
|||||||
dismissBlock();
|
dismissBlock();
|
||||||
}];
|
}];
|
||||||
|
|
||||||
if (_isShield) {
|
if (_isShield || _showCheck) {
|
||||||
dispatchAfter(0.15, dispatch_get_main_queue(), ^{
|
dispatchAfter(0.15, dispatch_get_main_queue(), ^{
|
||||||
[_spinner setSucceed];
|
[_spinner setSucceed];
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user