Skip saving config on spurious scroll events

This commit is contained in:
Mark Qvist 2024-09-18 10:06:49 +02:00
parent 074bb4aa4e
commit 72e21a4735

View File

@ -2768,6 +2768,7 @@ class SidebandApp(MDApp):
pre = self.settings_screen.ids.settings_lxmf_sync_periodic.text
self.settings_screen.ids.settings_lxmf_sync_periodic.text = "Auto sync every "+interval_text
if save:
if (event == None or not hasattr(event, "button") or not event.button) or not "scroll" in event.button:
self.sideband.config["lxmf_sync_interval"] = interval
self.sideband.save_configuration()
@ -2782,6 +2783,7 @@ class SidebandApp(MDApp):
if slider_val < 1:
slider_val = 1
self.sideband.config["lxmf_inbound_stamp_cost"] = slider_val
if (event == None or not hasattr(event, "button") or not event.button) or not "scroll" in event.button:
self.sideband.save_configuration()
self.settings_screen.ids.settings_lxmf_address.text = RNS.hexrep(self.sideband.lxmf_destination.hash, delimit=False)