forked from auracaster/bumble_mirror
don't delete advertising prefs on disconnection
This commit is contained in:
@@ -1425,10 +1425,10 @@ class Device(CompositeEventEmitter):
|
|||||||
check_result=True,
|
check_result=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
self.advertising_own_address_type = own_address_type
|
|
||||||
self.auto_restart_advertising = auto_restart
|
|
||||||
self.advertising_type = advertising_type
|
self.advertising_type = advertising_type
|
||||||
|
self.advertising_own_address_type = own_address_type
|
||||||
self.advertising = True
|
self.advertising = True
|
||||||
|
self.auto_restart_advertising = auto_restart
|
||||||
|
|
||||||
async def stop_advertising(self) -> None:
|
async def stop_advertising(self) -> None:
|
||||||
# Disable advertising
|
# Disable advertising
|
||||||
@@ -1438,9 +1438,9 @@ class Device(CompositeEventEmitter):
|
|||||||
check_result=True,
|
check_result=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.advertising_type = None
|
||||||
self.advertising_own_address_type = None
|
self.advertising_own_address_type = None
|
||||||
self.advertising = False
|
self.advertising = False
|
||||||
self.advertising_type = None
|
|
||||||
self.auto_restart_advertising = False
|
self.auto_restart_advertising = False
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@@ -2630,7 +2630,6 @@ class Device(CompositeEventEmitter):
|
|||||||
own_address_type = self.advertising_own_address_type
|
own_address_type = self.advertising_own_address_type
|
||||||
|
|
||||||
# We are no longer advertising
|
# We are no longer advertising
|
||||||
self.advertising_own_address_type = None
|
|
||||||
self.advertising = False
|
self.advertising = False
|
||||||
|
|
||||||
if own_address_type in (
|
if own_address_type in (
|
||||||
@@ -2687,7 +2686,6 @@ class Device(CompositeEventEmitter):
|
|||||||
and self.advertising
|
and self.advertising
|
||||||
and self.advertising_type.is_directed
|
and self.advertising_type.is_directed
|
||||||
):
|
):
|
||||||
self.advertising_own_address_type = None
|
|
||||||
self.advertising = False
|
self.advertising = False
|
||||||
|
|
||||||
# Notify listeners
|
# Notify listeners
|
||||||
|
|||||||
Reference in New Issue
Block a user