Skip to content

Commit c1b1d6c

Browse files
committed
chore: small tweak
1 parent f8929b5 commit c1b1d6c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ios/RCTWebRTC/InAppScreenCapturer.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,11 @@ - (void)stopCapture {
108108

109109
- (void)registerAppStateObservers {
110110
if (_observingAppState) return;
111-
_observingAppState = YES;
112111

113112
dispatch_async(dispatch_get_main_queue(), ^{
113+
if (self->_observingAppState || !self->_capturing) return;
114+
self->_observingAppState = YES;
115+
114116
[[NSNotificationCenter defaultCenter] addObserver:self
115117
selector:@selector(appDidBecomeActive)
116118
name:UIApplicationDidBecomeActiveNotification

0 commit comments

Comments
 (0)