Skip to content

Conversation

@jvsena42
Copy link
Member

@jvsena42 jvsena42 commented Dec 26, 2025

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

@jvsena42 jvsena42 requested review from Copilot and ovitrif December 26, 2025 12:57
@jvsena42 jvsena42 self-assigned this Dec 26, 2025
Copy link
Contributor

Copilot AI left a 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 isQrCode parameter to handleScan function 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) {
Copy link

Copilot AI Dec 26, 2025

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.

Copilot uses AI. Check for mistakes.
}

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

Function parameter isQrCode is unused.
@ovitrif ovitrif force-pushed the feat/nav3 branch 3 times, most recently from e57eef3 to 1eb159f Compare December 26, 2025 19:08
@jvsena42 jvsena42 linked an issue Dec 27, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Different error message in Toast when pasting (vs. iOS)

3 participants