-
Notifications
You must be signed in to change notification settings - Fork 1
fix: qr code decoding error message #559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/nav3
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the error messages displayed when QR code decoding fails to align with iOS implementation. The change improves consistency across platforms by using the same generic error messages for all QR code decode failures.
- Updated error message strings to use more generic wording matching iOS
- Added
isQrCodeparameter tohandleScanfunction to distinguish QR code scans from pasted invoices
| } | ||
|
|
||
| private suspend fun handleScan(result: String) = withContext(bgDispatcher) { | ||
| private suspend fun handleScan(result: String, isQrCode: Boolean) = withContext(bgDispatcher) { |
Copilot
AI
Dec 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The isQrCode parameter is added to the function signature but is not used in the visible code. If this parameter is intended to differentiate between QR code scans and pasted invoices (as mentioned in the PR description), consider implementing conditional logic to use different error messages based on this flag. Otherwise, this parameter appears unused and should be removed.
| } | ||
|
|
||
| private suspend fun handleScan(result: String) = withContext(bgDispatcher) { | ||
| private suspend fun handleScan(result: String, isQrCode: Boolean) = withContext(bgDispatcher) { |
Check warning
Code scanning / detekt
Function parameter is unused and should be removed. Warning
e57eef3 to
1eb159f
Compare
Fixes #502
Description
This PR updates the QR code decode message, like iOS
OBS: I noticed that iOS uses the same message to all decode cases. It could be used a generic message to when user paste the invoice
Preview
N/A
QA Notes
Read invalid QR code