| Index: webrtc/examples/objc/AppRTCMobile/mac/APPRTCViewController.m
|
| diff --git a/webrtc/examples/objc/AppRTCMobile/mac/APPRTCViewController.m b/webrtc/examples/objc/AppRTCMobile/mac/APPRTCViewController.m
|
| index c23e0d59cd234e962fe00c1fa6dfc86789f6fd9b..d6aa71038ac146e354b76ceb5c24460d96fa098a 100644
|
| --- a/webrtc/examples/objc/AppRTCMobile/mac/APPRTCViewController.m
|
| +++ b/webrtc/examples/objc/AppRTCMobile/mac/APPRTCViewController.m
|
| @@ -63,10 +63,12 @@ @implementation APPRTCMainView {
|
|
|
|
|
| - (void)displayLogMessage:(NSString *)message {
|
| - _logView.string =
|
| - [NSString stringWithFormat:@"%@%@\n", _logView.string, message];
|
| - NSRange range = NSMakeRange(_logView.string.length, 0);
|
| - [_logView scrollRangeToVisible:range];
|
| + dispatch_async(dispatch_get_main_queue(), ^{
|
| + _logView.string =
|
| + [NSString stringWithFormat:@"%@%@\n", _logView.string, message];
|
| + NSRange range = NSMakeRange(_logView.string.length, 0);
|
| + [_logView scrollRangeToVisible:range];
|
| + });
|
| }
|
|
|
| #pragma mark - Private
|
| @@ -413,9 +415,11 @@ - (APPRTCMainView*)mainView {
|
| }
|
|
|
| - (void)showAlertWithMessage:(NSString*)message {
|
| - NSAlert* alert = [[NSAlert alloc] init];
|
| - [alert setMessageText:message];
|
| - [alert runModal];
|
| + dispatch_async(dispatch_get_main_queue(), ^{
|
| + NSAlert* alert = [[NSAlert alloc] init];
|
| + [alert setMessageText:message];
|
| + [alert runModal];
|
| + });
|
| }
|
|
|
| - (void)resetUI {
|
|
|