Execute completion handler on main queue (#4947) (#4948)

(cherry picked from commit 8d4b602ab8)

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
This commit is contained in:
Mattermost Build 2020-11-04 12:53:31 +01:00 committed by GitHub
parent a0eb5192ce
commit ebe57e9950
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -102,7 +102,9 @@ NSString *const ReplyActionID = @"REPLY_ACTION";
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:[notifications count]];
}];
completionHandler();
dispatch_async(dispatch_get_main_queue(), ^{
completionHandler();
});
}
- (void) handleReplyFailure:(NSString *)channelId completionHandler:(void (^)(void))completionHandler {
@ -124,7 +126,9 @@ NSString *const ReplyActionID = @"REPLY_ACTION";
};
[notificationCenter sendLocalNotification:notification withId:id];
completionHandler();
dispatch_async(dispatch_get_main_queue(), ^{
completionHandler();
});
}
#pragma mark - Method Swizzling