mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2025-07-04 00:36:23 +00:00
Don't attempt to pair on entry to foreground if we've become unpaired
This commit is contained in:
parent
63297c8483
commit
132a1fc410
@ -317,13 +317,22 @@ static NSMutableSet* hostList;
|
|||||||
if ([[serverInfoResp getStringTag:@"PairStatus"] isEqualToString:@"1"]) {
|
if ([[serverInfoResp getStringTag:@"PairStatus"] isEqualToString:@"1"]) {
|
||||||
Log(LOG_I, @"Already Paired");
|
Log(LOG_I, @"Already Paired");
|
||||||
[self alreadyPaired];
|
[self alreadyPaired];
|
||||||
} else {
|
}
|
||||||
|
// Only pair when this was the result of explicit user action
|
||||||
|
else if (view != nil) {
|
||||||
Log(LOG_I, @"Trying to pair");
|
Log(LOG_I, @"Trying to pair");
|
||||||
// Polling the server while pairing causes the server to screw up
|
// Polling the server while pairing causes the server to screw up
|
||||||
[self->_discMan stopDiscoveryBlocking];
|
[self->_discMan stopDiscoveryBlocking];
|
||||||
PairManager* pMan = [[PairManager alloc] initWithManager:hMan andCert:self->_cert callback:self];
|
PairManager* pMan = [[PairManager alloc] initWithManager:hMan andCert:self->_cert callback:self];
|
||||||
[self->_opQueue addOperation:pMan];
|
[self->_opQueue addOperation:pMan];
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
// Not user action, so just return to host screen
|
||||||
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
[self hideLoadingFrame];
|
||||||
|
[self showHostSelectionView];
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user