EvanZhouDev / cronix

https://cronix.vercel.app
GNU General Public License v3.0
5 stars 0 forks source link

Fix Scramble Load Mechanics #1

Closed EvanZhouDev closed 1 year ago

EvanZhouDev commented 1 year ago

When scramble is loading, and you reload the page, it is stuck on the "Fetching scramble..." text.

EvanZhouDev commented 1 year ago
  1. Code edited so that it automatically fetches scramble when switched to session with loading message
  2. Current issue is the fact that when you queue the scramble (by switching to a new event like 4x4) and quickly switch to new session during the loading, the new session’s scramble is replaced with the queued scramble, no matter whether or not the new scramble needs to be replaced. This even occurs when the scramble types are not the same.
  3. Proposed fix: make it so that setScramble accepts a session parameter that sets the scramble for that session and that session only. This will fix the issue of queuing.
  4. Advanced implementation: if session parameter not provided, then just use the default session. However, because of async and sync issues, it doesn’t work with purely that. We need to pass on the session parameter directly from wherever we are calling setScramble from the outside.
EvanZhouDev commented 1 year ago

Fixed with a "set scramble" command that targets a specific session.