Fix grid overlay toggle - sync with MijickCamera's built-in grid
- MijickCamera's grid defaults to ON (true) - Add setGridVisibility() call in onAppear to sync initial state - Add onChange handler to update grid visibility when setting changes
This commit is contained in:
parent
fee15463d6
commit
b96fc63b7b
@ -164,6 +164,8 @@ struct CustomCameraScreen: MCameraScreen {
|
||||
lastMagnification = zoomFactor
|
||||
// Track initial camera position
|
||||
currentCameraPosition = cameraSettings.cameraPosition
|
||||
// Sync grid visibility with MijickCamera (defaults to true, so we need to set it)
|
||||
setGridVisibility(cameraSettings.isGridVisible)
|
||||
}
|
||||
.onChange(of: cameraSettings.cameraPositionRaw) { _, newRaw in
|
||||
// Switch camera when position changes in settings
|
||||
@ -185,6 +187,10 @@ struct CustomCameraScreen: MCameraScreen {
|
||||
// Only update when sync setting changes, not on every color change
|
||||
updateFlashSyncState()
|
||||
}
|
||||
.onChange(of: cameraSettings.isGridVisible) { _, newValue in
|
||||
// Sync grid visibility with MijickCamera
|
||||
setGridVisibility(newValue)
|
||||
}
|
||||
.onChange(of: cameraManager.capturedMedia) { _, newMedia in
|
||||
// Directly observe capture completion - bypasses MijickCamera's callback issues
|
||||
if let media = newMedia, let image = media.getImage() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user