talawa icon indicating copy to clipboard operation
talawa copied to clipboard

Bug : once code detected scanning should stop

Open AdityaBirangal opened this issue 3 years ago • 9 comments

Describe the bug in set api url using QR code feature
scanning is being done continuously after code detected

To Reproduce Steps to reproduce the behaviour:

Try to set api URL using QR code & see logs in terminal

Expected behavior once code detected scanning should stop

Actual behavior scanning is being done continuously after code detected

Screenshots If applicable, add screenshots to help explain your problem.

Additional details This can be easily fixed by doing minor modifications in set_url_view_model.dart

AdityaBirangal avatar Jul 15 '21 20:07 AdityaBirangal

Can you exactly specify the logs. Because the qr scan will only we considered successful if it's a valid qr in terms of talawa.

CyberWake avatar Jul 17 '21 09:07 CyberWake

Until the same is achieved it will continue to scan once a talawa generated qr is scanned it will automatically stop.

CyberWake avatar Jul 17 '21 09:07 CyberWake

@AdityaBirangal please add video reproducing the issue.

Sagar2366 avatar Jul 17 '21 11:07 Sagar2366

@CyberWake Got it Accutly I scanned QR of url (our heroku api). Can you share formate of valid QR code or demo code ? It keeps scanning it & logs are being generated in terminal. within fraction on time it scan same code multiple times.

This can be fixed using controller.scannedDataStream.first instead of just stream

It would be good if we add pop-up 'you scan wrong code' if user scan invalid code. Whats your opinion @CyberWake ?

AdityaBirangal avatar Jul 17 '21 20:07 AdityaBirangal

You need to scan a qr from invite feature exclusive to talawa app from the one of the user who is already logged in and has access to dashboard

CyberWake avatar Jul 17 '21 20:07 CyberWake

Logs printed are from the package itself and talking of the poping of the context it does that If you scan a qr from the way I told. QR contains data other than url of the server.

CyberWake avatar Jul 17 '21 20:07 CyberWake

Everything works fine if valid code is provided 👍🏻

AdityaBirangal avatar Jul 18 '21 19:07 AdityaBirangal

Can we add pop-up message for invalid code too ?

AdityaBirangal avatar Jul 18 '21 19:07 AdityaBirangal

Can we add pop-up message for invalid code too ?

I Will have to look in to that your concern seems to be obvious.

CyberWake avatar Aug 12 '21 09:08 CyberWake