mirror of
https://github.com/basicswap/basicswap.git
synced 2025-12-29 08:51:37 +01:00
Fix enable/disable Update notification settings.
This commit is contained in:
@@ -11269,6 +11269,16 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
||||
settings_copy["notifications_outgoing_transactions"] = new_value
|
||||
settings_changed = True
|
||||
|
||||
if "notifications_swap_completed" in data:
|
||||
new_value = data["notifications_swap_completed"]
|
||||
ensure(
|
||||
isinstance(new_value, bool),
|
||||
"New notifications_swap_completed value not boolean",
|
||||
)
|
||||
if settings_copy.get("notifications_swap_completed", True) != new_value:
|
||||
settings_copy["notifications_swap_completed"] = new_value
|
||||
settings_changed = True
|
||||
|
||||
if "notifications_duration" in data:
|
||||
new_value = data["notifications_duration"]
|
||||
ensure(
|
||||
@@ -11283,6 +11293,15 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
||||
settings_copy["notifications_duration"] = new_value
|
||||
settings_changed = True
|
||||
|
||||
if "check_updates" in data:
|
||||
new_value = data["check_updates"]
|
||||
ensure(
|
||||
isinstance(new_value, bool), "New check_updates value not boolean"
|
||||
)
|
||||
if settings_copy.get("check_updates", True) != new_value:
|
||||
settings_copy["check_updates"] = new_value
|
||||
settings_changed = True
|
||||
|
||||
if settings_changed:
|
||||
settings_path = os.path.join(self.data_dir, cfg.CONFIG_FILENAME)
|
||||
settings_path_new = settings_path + ".new"
|
||||
|
||||
Reference in New Issue
Block a user