updateScroll method

void updateScroll()

Обновление скролла

Implementation

void updateScroll() {
  if (_comicsViewModel.disableSound) {
    stop();
    return;
  }

  final scroll = _comicsViewModel.scroll;
  final soundAnim = SoundAnimation.findCurrent(
    sound.animations,
    scroll - 1,
    scroll,
  );

  if (soundAnim != null && !_isPlaying) {
    play();
  } else if (soundAnim == null && _isPlaying) {
    stop();
  }
}