react-native-rectangle-doc-scanner 3.87.0 → 3.88.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -29,11 +29,9 @@
|
|
|
29
29
|
[self start];
|
|
30
30
|
_hasSetupCamera = YES;
|
|
31
31
|
} else if (_hasSetupCamera && self.window && !CGRectIsEmpty(self.bounds)) {
|
|
32
|
-
//
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
[self start];
|
|
36
|
-
}
|
|
32
|
+
// Restart camera if needed (defensive check)
|
|
33
|
+
NSLog(@"[DocumentScanner] Layout update, ensuring camera is running");
|
|
34
|
+
[self start];
|
|
37
35
|
}
|
|
38
36
|
}
|
|
39
37
|
|
|
@@ -41,12 +39,10 @@
|
|
|
41
39
|
[super didMoveToWindow];
|
|
42
40
|
if (self.window && _hasSetupCamera) {
|
|
43
41
|
// Restart camera when view is added back to window
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
});
|
|
49
|
-
}
|
|
42
|
+
NSLog(@"[DocumentScanner] View added to window, restarting camera...");
|
|
43
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
44
|
+
[self start];
|
|
45
|
+
});
|
|
50
46
|
} else if (!self.window && _hasSetupCamera) {
|
|
51
47
|
// Stop camera when view is removed from window
|
|
52
48
|
NSLog(@"[DocumentScanner] View removed from window, stopping camera");
|