Open
Description
Describe the bug
on version 6.0.1 after calling closeWatch() the native volume UI is not visible anymore inside the app. I need to restart the app to see the volume UI again.
To Reproduce
Steps to reproduce the behavior:
- Press Volume button - native UI is showing
- startWatch
- Press Volume button - native UI is not showing (correct)
- clearWatch
- Press Volume button - native UI is not showing (not correct)
Expected behavior
at point 5 the native UI should come up
Smartphone (please complete the following information):
- Device: iPhone 11
- OS: 18.3.2
- Plugin Version: 6.0.1
Additional context
If I modify the stopHandler in VolumeButtonHandler.swift like this
public func stopHandler() {
guard isStarted else { return }
isStarted = false
volumeView?.isHidden = false
self.observation = nil
NotificationCenter.default.removeObserver(self)
try? session?.setActive(false) // <-- Add this line
DispatchQueue.main.async { // <-- Add this line
self.volumeView?.removeFromSuperview() // <-- Add this line
} // <-- Add this line
}
the native volume ui start showing again at point 5. The problem is that if I start watching again the native UI still shows.
Android work as expected. Thanks!