HugoFara / lwt

Learn languages by reading! A language learning app stemmed from Learning with Texts (LWT).
https://hugofara.github.io/lwt/
The Unlicense
169 stars 19 forks source link

Using the "look up new words" button, next to the "TODO" causes duplicate database entries #97

Closed zenkeku closed 1 year ago

zenkeku commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

When using this button, the side panel opens up with the definitions. Upon filling it out and clicking the "save" button will submit the appropriate terms into the database, however it isn't reflected in the text. Blue words remain blue words. However, if you click on one, it will load up with the definition that you set. If you try to set the word to "known" or something else, it will throw a SQL error talking about duplicates. The problem can be solved if you click "set all to known" and wait a moment for the text to load.

To Reproduce Steps to reproduce the behavior: Refer to above

Expected behavior A clear and concise description of what you expected to happen.

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

Screenshot 2023-03-13 at 10 59 51 AM

In the above screenshot, all words have an entry, but the blue words still appear. As shown below:

Screenshot 2023-03-13 at 11 01 43 AM

Desktop (please complete the following information):

Smartphone (please complete the following information): N/A

Additional context Add any other context about the problem here.

HugoFara commented 1 year ago

Hello!

I'm not sure what was causing it, I think I ran into your a time ago, but now I can no longer reproduce it: everything works fine. Does the issue persists for you with LWT 2.8.0?