File tree Expand file tree Collapse file tree 1 file changed +15
-22
lines changed
IdentityCore/src/webview/embeddedWebview Expand file tree Collapse file tree 1 file changed +15
-22
lines changed Original file line number Diff line number Diff line change @@ -88,32 +88,25 @@ -(void)dealloc
88
88
89
89
- (void )startWithCompletionHandler : (MSIDWebUICompletionHandler)completionHandler
90
90
{
91
- // If we're not on the main thread when trying to kick up the UI then
92
- // dispatch over to the main thread.
93
- if (![NSThread isMainThread ])
94
- {
95
- dispatch_async (dispatch_get_main_queue (), ^{
96
- [self startWithCompletionHandler: completionHandler];
97
- });
98
- return ;
99
- }
100
-
101
91
// Save the completion block
102
92
_completionHandler = [completionHandler copy ];
103
93
104
- NSError *error = nil ;
105
- [self loadView: &error];
106
- if (error)
107
- {
108
- [self endWebAuthWithURL: nil error: error];
109
- return ;
110
- }
111
-
112
- NSMutableURLRequest *request = [[NSMutableURLRequest alloc ] initWithURL: _startURL];
113
- for (NSString *headerKey in _customHeaders)
114
- [request addValue: _customHeaders[headerKey] forHTTPHeaderField: headerKey];
94
+ dispatch_async (dispatch_get_main_queue (), ^{
115
95
116
- [self startRequest: request];
96
+ NSError *error = nil ;
97
+ [self loadView: &error];
98
+ if (error)
99
+ {
100
+ [self endWebAuthWithURL: nil error: error];
101
+ return ;
102
+ }
103
+
104
+ NSMutableURLRequest *request = [[NSMutableURLRequest alloc ] initWithURL: _startURL];
105
+ for (NSString *headerKey in _customHeaders)
106
+ [request addValue: _customHeaders[headerKey] forHTTPHeaderField: headerKey];
107
+
108
+ [self startRequest: request];
109
+ });
117
110
}
118
111
119
112
- (void )cancel
You can’t perform that action at this time.
0 commit comments