refactor: use guard in handleProfileScan
This commit is contained in:
@@ -243,7 +243,10 @@ struct QRCodeView: View {
|
||||
}
|
||||
|
||||
func handleProfileScan(_ prof: String) {
|
||||
if scannedCode != prof {
|
||||
guard scannedCode != prof else {
|
||||
return
|
||||
}
|
||||
|
||||
generator.impactOccurred()
|
||||
cameraAnimate {
|
||||
scannedCode = prof
|
||||
@@ -257,7 +260,6 @@ struct QRCodeView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func cameraAnimate(completion: @escaping () -> Void) {
|
||||
outerTrimEnd = 0.0
|
||||
|
||||
Reference in New Issue
Block a user