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

Fix recommended dictionary download queue #1410

Merged
merged 3 commits into from
Sep 12, 2024

Conversation

khaitruong922
Copy link

@khaitruong922 khaitruong922 commented Sep 11, 2024

  • The download queue does not work because the _importDictionaries call is not awaited so the function ends immediately without checking any other item in queue.
  • When the dictionary is in queue, disable its download button. Currently, if the user reopens the recommended dictionary modal, the download button is still active.

@khaitruong922 khaitruong922 requested a review from a team as a code owner September 11, 2024 04:31
@khaitruong922
Copy link
Author

khaitruong922 commented Sep 11, 2024

Current state: Try to click download other dictionaries while a dictionary is downloading, the buttons are disabled but they are not enqueued.

@Kuuuube
Copy link
Member

Kuuuube commented Sep 12, 2024

Any reason for replacing the shift with [0] and moving the shift down later? From a quick look that change appears to be unnecessary.

@khaitruong922
Copy link
Author

khaitruong922 commented Sep 12, 2024

This is to keep track exactly which dictionary is in download queue.
The user can close the recommended modal and reopen it again. At this point, it will disable download button if the download is in queue. If we remove from the queue before the download is finished then the button will be enabled even though it is being downloaded.

@Kuuuube Kuuuube added kind/bug The issue or PR is regarding a bug area/ui-ux The issue or PR is related to UI/UX/Design labels Sep 12, 2024
@Kuuuube Kuuuube added this pull request to the merge queue Sep 12, 2024
Merged via the queue into yomidevs:master with commit 5f5629b Sep 12, 2024
9 checks passed
@khaitruong922 khaitruong922 deleted the fix-dictionary-queue branch September 13, 2024 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui-ux The issue or PR is related to UI/UX/Design kind/bug The issue or PR is regarding a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants