mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-06-17 06:01:13 +00:00
Only cleanup the stream on termination
This commit is contained in:
@@ -105,14 +105,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)willMoveToParentViewController:(UIViewController *)parent {
|
- (void)willMoveToParentViewController:(UIViewController *)parent {
|
||||||
[_controllerSupport cleanup];
|
// Only cleanup when we're being destroyed
|
||||||
[UIApplication sharedApplication].idleTimerDisabled = NO;
|
if (parent == nil) {
|
||||||
[_streamMan stopStream];
|
[_controllerSupport cleanup];
|
||||||
if (_inactivityTimer != nil) {
|
[UIApplication sharedApplication].idleTimerDisabled = NO;
|
||||||
[_inactivityTimer invalidate];
|
[_streamMan stopStream];
|
||||||
_inactivityTimer = nil;
|
if (_inactivityTimer != nil) {
|
||||||
|
[_inactivityTimer invalidate];
|
||||||
|
_inactivityTimer = nil;
|
||||||
|
}
|
||||||
|
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||||
}
|
}
|
||||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) returnToMainFrame {
|
- (void) returnToMainFrame {
|
||||||
|
|||||||
Reference in New Issue
Block a user