mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-07-11 22:48:56 +00:00
eb6d8768eb
When a scanner is shown a QR code of a different kind than it expects, it now tells the user what they actually scanned and where to scan it, instead of a generic "invalid" message. On parse failure each scanner falls back to a shared classifier (identifyQRCode / wrongQRCodeMessage) that tries the other known parsers — connection link, server address, migration link, desktop address — and shows "This is a X. To use it, ...", or the existing "not a SimpleX code" message when nothing matches. Each screen keeps its own parser and success path; only the failure branch changed. The wrong-type alert is presented through each view's own alert state so it shows within the scanner's presentation. Mirrored on Android, desktop and iOS. Plan: plans/2026-07-09-qr-recognise-wrong-type.md. Note: the iOS Swift was written without an Xcode toolchain and is not yet compiled — needs a Mac/CI build to verify.