simple: refactor SimpleApplet data_changed signature

This commit is contained in:
Simon Renblad 2023-07-12 11:34:55 +08:00 committed by Sébastien Bourdeauducq
parent d1f2727126
commit fe0f6d8a2c
1 changed files with 6 additions and 1 deletions

View File

@ -270,7 +270,12 @@ class SimpleApplet:
return False return False
def emit_data_changed(self, data, mod_buffer): def emit_data_changed(self, data, mod_buffer):
self.main_widget.data_changed(data, mod_buffer) persist = dict()
value = dict()
metadata = dict()
for k, d in data.items():
persist[k], value[k], metadata[k] = d
self.main_widget.data_changed(value, metadata, persist, mod_buffer)
def flush_mod_buffer(self): def flush_mod_buffer(self):
self.emit_data_changed(self.data, self.mod_buffer) self.emit_data_changed(self.data, self.mod_buffer)