Skip to content

Commit

Permalink
✨ Reacts only to QR codes that contains "sswrewards://" (#1177)
Browse files Browse the repository at this point in the history
  • Loading branch information
jernejk authored Jan 30, 2025
1 parent 3a93abe commit 2bfaee8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/MobileUI/Features/Scanner/ScanViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,15 @@ private void DetectionFinished(BarcodeResult[] result)
return;
}

IsCameraEnabled = false;

var rawValue = result.FirstOrDefault()?.RawValue;
if (string.IsNullOrWhiteSpace(rawValue) || !rawValue.StartsWith("sswrewards://", StringComparison.InvariantCultureIgnoreCase))
{
// SSW Rewards code not found, keep looking.
return;
}

IsCameraEnabled = false;

var popup = new PopupPages.ScanResult(_resultViewModel, rawValue);
MopupService.Instance.PushAsync(popup);
});
Expand Down

0 comments on commit 2bfaee8

Please sign in to comment.