mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +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:
|
||||
self.contentController = .progress(ProgressWindowController(light: style == .light))
|
||||
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):
|
||||
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)
|
||||
isUserInteractionEnabled = false
|
||||
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()
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
@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)updateLayout;
|
||||
|
@ -135,6 +135,7 @@ static bool ProxyWindowIsLight = true;
|
||||
NSString *_text;
|
||||
UIImage *_icon;
|
||||
bool _isShield;
|
||||
bool _showCheck;
|
||||
UIVisualEffectView *_effectView;
|
||||
UIView *_backgroundView;
|
||||
ProxySpinnerView *_spinner;
|
||||
@ -168,13 +169,14 @@ static bool ProxyWindowIsLight = true;
|
||||
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];
|
||||
if (self != nil) {
|
||||
_light = light;
|
||||
_text = text;
|
||||
_icon = icon;
|
||||
_isShield = isShield;
|
||||
_showCheck = showCheck;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@ -316,7 +318,7 @@ static bool ProxyWindowIsLight = true;
|
||||
dismissBlock();
|
||||
}];
|
||||
|
||||
if (_isShield) {
|
||||
if (_isShield || _showCheck) {
|
||||
dispatchAfter(0.15, dispatch_get_main_queue(), ^{
|
||||
[_spinner setSucceed];
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user