From 924a2751e019b15e22d53acace10d57fffea4319 Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Fri, 30 Apr 2021 09:25:47 +0000 Subject: [PATCH] Revert "Ensure method which updates UI is called in main thread" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 0365c99474fd812283842f650cc090b957d73ef2. Reason for revert: Breaks downstream project. Original change's description: > Ensure method which updates UI is called in main thread > > Bug: None > Change-Id: I52d6871e7852e15ef8404377ed37ea894aedae5a > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216500 > Commit-Queue: Kári Helgason > Reviewed-by: Kári Helgason > Cr-Commit-Position: refs/heads/master@{#33881} TBR=mbonadei@webrtc.org,kthelgason@webrtc.org,kthelgason@google.com,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com,aidenluo.me@gmail.com Change-Id: I22e04cefd3766fc9118baaa3bb3464ff03b9bad3 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: None Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216684 Reviewed-by: Mirko Bonadei Commit-Queue: Mirko Bonadei Cr-Commit-Position: refs/heads/master@{#33883} --- AUTHORS | 1 - examples/objc/AppRTCMobile/ARDAppClient.m | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/AUTHORS b/AUTHORS index e314db297a..64488bfc62 100644 --- a/AUTHORS +++ b/AUTHORS @@ -80,7 +80,6 @@ Paul Kapustin Peng Yu Philipp Hancke Piasy Xu -Qi Luo Rafael Lopez Diez Ralph Giles Raman Budny diff --git a/examples/objc/AppRTCMobile/ARDAppClient.m b/examples/objc/AppRTCMobile/ARDAppClient.m index 9d5107d33b..ccd5bb0662 100644 --- a/examples/objc/AppRTCMobile/ARDAppClient.m +++ b/examples/objc/AppRTCMobile/ARDAppClient.m @@ -212,11 +212,7 @@ static int const kKbpsMultiplier = 1000; return; } _state = state; - __weak ARDAppClient *weakSelf = self; - dispatch_async(dispatch_get_main_queue(), ^{ - ARDAppClient *strongSelf = weakSelf; - [strongSelf.delegate appClient:strongSelf didChangeState:strongSelf.state]; - }); + [_delegate appClient:self didChangeState:_state]; } - (void)connectToRoomWithId:(NSString *)roomId