Skip to content
This repository was archived by the owner on Apr 29, 2024. It is now read-only.

Commit 182fd8f

Browse files
authored
[CloudCaptions] We must create UIAlertControllers on the main thread. (#374)
1 parent 1d0f327 commit 182fd8f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ios8/CloudCaptions/CloudCaptions/Controllers/ExistingImageViewController.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,11 @@ void LoadImages()
201201
string dismissButton = "Okay";
202202
string errorMessage = "We couldn't fetch one or more of the thumbnails";
203203

204-
UIAlertController alert = UIAlertController.Create (errorTitle, errorMessage, UIAlertControllerStyle.Alert);
205-
alert.AddAction (UIAlertAction.Create (dismissButton, UIAlertActionStyle.Cancel, null));
206-
InvokeOnMainThread (() => PresentViewController (alert, true, null));
204+
InvokeOnMainThread (() => {
205+
UIAlertController alert = UIAlertController.Create (errorTitle, errorMessage, UIAlertControllerStyle.Alert);
206+
alert.AddAction (UIAlertAction.Create (dismissButton, UIAlertActionStyle.Cancel, null));
207+
PresentViewController (alert, true, null);
208+
});
207209
}
208210
};
209211

0 commit comments

Comments
 (0)