mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-04-22 16:26:59 +00:00
Replace dispatch_sync with dispatch_async in pairing
This commit is contained in:
@@ -40,7 +40,7 @@ static NSMutableSet* hostList;
|
|||||||
static NSArray* appList;
|
static NSArray* appList;
|
||||||
|
|
||||||
- (void)showPIN:(NSString *)PIN {
|
- (void)showPIN:(NSString *)PIN {
|
||||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
_pairAlert = [UIAlertController alertControllerWithTitle:@"Pairing"
|
_pairAlert = [UIAlertController alertControllerWithTitle:@"Pairing"
|
||||||
message:[NSString stringWithFormat:@"Enter the following PIN on the host machine: %@", PIN]
|
message:[NSString stringWithFormat:@"Enter the following PIN on the host machine: %@", PIN]
|
||||||
preferredStyle:UIAlertControllerStyleAlert];
|
preferredStyle:UIAlertControllerStyleAlert];
|
||||||
@@ -50,7 +50,7 @@ static NSArray* appList;
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)pairFailed:(NSString *)message {
|
- (void)pairFailed:(NSString *)message {
|
||||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[_pairAlert dismissViewControllerAnimated:YES completion:nil];
|
[_pairAlert dismissViewControllerAnimated:YES completion:nil];
|
||||||
_pairAlert = [UIAlertController alertControllerWithTitle:@"Pairing Failed"
|
_pairAlert = [UIAlertController alertControllerWithTitle:@"Pairing Failed"
|
||||||
message:message
|
message:message
|
||||||
@@ -64,7 +64,7 @@ static NSArray* appList;
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)pairSuccessful {
|
- (void)pairSuccessful {
|
||||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[_pairAlert dismissViewControllerAnimated:YES completion:nil];
|
[_pairAlert dismissViewControllerAnimated:YES completion:nil];
|
||||||
[_discMan startDiscovery];
|
[_discMan startDiscovery];
|
||||||
[self alreadyPaired];
|
[self alreadyPaired];
|
||||||
|
|||||||
Reference in New Issue
Block a user