Fixes #359 by making sure we only have one source of truth when it comes to the number of frames in the indicator.
Having the frame count as a separate state might lead to unfortunate race conditions, where the frames array has changed but the count hasn't yet, causing index out of bounds error. Now, the frames count is only computed when needed, synchronously, in the composition.
I have been furiously switching themes for over a minute and can't make the component crash anymore.
Fixes #359 by making sure we only have one source of truth when it comes to the number of frames in the indicator.
Having the frame count as a separate state might lead to unfortunate race conditions, where the frames array has changed but the count hasn't yet, causing index out of bounds error. Now, the frames count is only computed when needed, synchronously, in the composition.
I have been furiously switching themes for over a minute and can't make the component crash anymore.