Don't start listening twice
We get a notification for listening going to True after start_listening(), but we don't need to start it again in that case.
This commit is contained in:
parent
82f62059f0
commit
0ce60deb34
|
@ -82,8 +82,12 @@ class DrawingPerspective(Gtk.Stack):
|
|||
return "drawing_perspective"
|
||||
|
||||
def _on_connected(self, device, pspec):
|
||||
# Turns out we don't really care about whether the device is
|
||||
# connected or not, it has little effect on how we work here
|
||||
pass
|
||||
|
||||
def _on_listening_stopped(self, device, pspec):
|
||||
# We never want to stop listening
|
||||
device.start_listening()
|
||||
if not device.listening:
|
||||
logger.debug(f'{device.name} - listening stopped, restarting')
|
||||
# We never want to stop listening
|
||||
device.start_listening()
|
||||
|
|
Loading…
Reference in New Issue