Skip to content
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

Duplicated text in QR Code Activity history #314

Closed
yog24esh opened this issue Mar 27, 2019 · 7 comments
Closed

Duplicated text in QR Code Activity history #314

yog24esh opened this issue Mar 27, 2019 · 7 comments
Labels
enhancement to be release Fixed, to be release
Milestone

Comments

@yog24esh
Copy link

yog24esh commented Mar 27, 2019

I think there is no use of logging the same user in the dropdown menu if he generate his qrcode again.

Here is the ex-

Screenshot (38)

Here what to be expected -

Screenshot (39)

@yog24esh yog24esh changed the title Use case issue in scannerAcitivity Use case issue in qrCodeAcitivity Mar 27, 2019
@Scar26
Copy link
Contributor

Scar26 commented Mar 27, 2019

working on this

@yog24esh
Copy link
Author

Have a look in qrtextdropdown id and attach the if statement to check if previous div value is same or not.

Screenshot (42)

  • I think before making/working we should ask one of the maintainers.

@Scar26
Copy link
Contributor

Scar26 commented Mar 27, 2019

This wouldn't work. the names are being stored in a global array called history. If I run the condition check at the div change,the array would still be different every time because it would just contain the same name multiple times.
Instead I attached the statement at the beginning of the pushtohistory function so if the name already exists in the array it's not pushed at all

@yog24esh
Copy link
Author

Yes but instead of checking the whole array , checking the last pushed element in the array would be useful otherwise it would defeat the purpose of history.
Ex - If a user1 generate qrcode. arr->[user1]
user2 generate qrcode. arr->[user1,user2]
user1 again generate qrcode. arr->[user1,user2,user1]
user1 is already present in array but it should be logged because it shows the history.

@Scar26
Copy link
Contributor

Scar26 commented Mar 28, 2019

Hm...makes sense,I mean I probably could just let it be logged into history and run the test in the for loop that they are using to append in the div. But it would be a little less efficient since we have to check a higher number of elements every-time. On the other hand, it makes sense that history should contain everything.

@llaske can we have your opinion on this?

@llaske llaske changed the title Use case issue in qrCodeAcitivity Duplicated text in QR Code Activity history Mar 28, 2019
@llaske
Copy link
Owner

llaske commented Apr 10, 2019

Easy access to old generated QR code is more useful than a real history with duplication.

So #317 fixed the issue in my opinion.
A supplemental fix is here: #339

@llaske llaske added the to be release Fixed, to be release label Apr 10, 2019
@llaske llaske added this to the v1.2 milestone Apr 10, 2019
@llaske
Copy link
Owner

llaske commented Sep 26, 2019

Closed in dd3c58d

@llaske llaske closed this as completed Sep 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement to be release Fixed, to be release
Projects
None yet
Development

No branches or pull requests

3 participants