File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ private async void GetTodoList(bool isAppStarting)
139139 return ;
140140 }
141141
142- // Once the token has been returned by ADAL , add it to the http authorization header, before making the call to access the To Do list service.
142+ // Once the token has been returned by MSAL , add it to the http authorization header, before making the call to access the To Do list service.
143143 httpClient . DefaultRequestHeaders . Authorization = new AuthenticationHeaderValue ( "Bearer" , result . AccessToken ) ;
144144
145145 // Call the To Do list service.
@@ -152,7 +152,10 @@ private async void GetTodoList(bool isAppStarting)
152152 JavaScriptSerializer serializer = new JavaScriptSerializer ( ) ;
153153 List < TodoItem > toDoArray = serializer . Deserialize < List < TodoItem > > ( s ) ;
154154
155- TodoList . ItemsSource = toDoArray . Select ( t => new { t . Title } ) ;
155+ Dispatcher . Invoke ( ( ) =>
156+ {
157+ TodoList . ItemsSource = toDoArray . Select ( t => new { t . Title } ) ;
158+ } ) ;
156159 }
157160 else
158161 {
You can’t perform that action at this time.
0 commit comments