mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-27 13:40:47 +00:00
`useMemo()` doesn't guarantee that the value won't be recomputed during re-renders. Unfortunately, every time `AudioContext` is instantiated - there is an audible click. This click happens during the change between conversations and is very annoying. Move both `AudioContext` instance to the GlobalAudioContext's top-level declarations, and `Audio`/`WaveformCache` to `useRef()`s.