Skip to content

Instantly share code, notes, and snippets.

@laevandus
Last active April 29, 2023 05:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laevandus/7e2fed5571afdebc427105000b6c151f to your computer and use it in GitHub Desktop.
Save laevandus/7e2fed5571afdebc427105000b6c151f to your computer and use it in GitHub Desktop.
// Old
iqDataSource.didChangeSampleCount
.sink { [weak self] sampleCount in
guard let self else { return }
let seriesDelta = self.layout.adjust(to: sampleCount)
guard seriesDelta < 0 else { return }
self.resetTiles(priority: .immediately)
}
.store(in: &cancellables)
// New
iqDataSource.didChangeSampleCount
.sink { [weak self] sampleCount in
guard let self else { return }
let seriesDelta = layout.adjust(to: sampleCount)
guard seriesDelta < 0 else { return }
resetTiles(priority: .immediately)
}
.store(in: &cancellables)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment