fix for starting the application with no receiver connected
This commit is contained in:
parent
79018bac2d
commit
c6d1ab4526
|
@ -120,8 +120,8 @@ class DeviceInfo(_api.PairedDevice):
|
||||||
self.features = _FeaturesArray(self)
|
self.features = _FeaturesArray(self)
|
||||||
|
|
||||||
# read them now, otherwise it it temporarily hang the UI
|
# read them now, otherwise it it temporarily hang the UI
|
||||||
if status >= STATUS.CONNECTED:
|
# if status >= STATUS.CONNECTED:
|
||||||
n, k, s, f = self.name, self.kind, self.serial, self.firmware
|
# n, k, s, f = self.name, self.kind, self.serial, self.firmware
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def receiver(self):
|
def receiver(self):
|
||||||
|
@ -381,7 +381,7 @@ class ReceiverListener(_EventsListener):
|
||||||
|
|
||||||
class _DUMMY_RECEIVER(object):
|
class _DUMMY_RECEIVER(object):
|
||||||
__slots__ = ['name', 'max_devices', 'status', 'status_text', 'devices']
|
__slots__ = ['name', 'max_devices', 'status', 'status_text', 'devices']
|
||||||
name = _api.Receiver.name
|
name = kind = _api.Receiver.name
|
||||||
max_devices = _api.Receiver.max_devices
|
max_devices = _api.Receiver.max_devices
|
||||||
status = STATUS.UNAVAILABLE
|
status = STATUS.UNAVAILABLE
|
||||||
status_text = _RECEIVER_STATUS_NAME[STATUS.UNAVAILABLE]
|
status_text = _RECEIVER_STATUS_NAME[STATUS.UNAVAILABLE]
|
||||||
|
|
|
@ -87,7 +87,7 @@ if __name__ == '__main__':
|
||||||
if listener is None:
|
if listener is None:
|
||||||
pairing.state = None
|
pairing.state = None
|
||||||
if notify_missing:
|
if notify_missing:
|
||||||
status_changed(DUMMY, True)
|
status_changed(DUMMY, None, True)
|
||||||
notify_missing = False
|
notify_missing = False
|
||||||
return retry
|
return retry
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue