Config editor bugfixes

feature/plugins-parameters
Jeremiah K 2023-04-27 18:08:40 -05:00
rodzic bbf7a93e0f
commit 088c964d8b
1 zmienionych plików z 8 dodań i 5 usunięć

Wyświetl plik

@ -180,11 +180,6 @@ def apply_changes():
new_config = OrderedDict()
new_config["matrix"] = config["matrix"]
new_config["meshtastic"] = config["meshtastic"]
new_config["matrix_rooms"] = config["matrix_rooms"]
new_config["logging"] = config["logging"]
new_config["plugins"] = config["plugins"]
messagebox.showinfo("Success", "Configuration changes saved.")
# Update matrix_rooms config
config["matrix_rooms"] = []
@ -192,6 +187,14 @@ def apply_changes():
room_id = room_frame.room_id_var.get()
meshtastic_channel = room_frame.meshtastic_channel_var.get()
config["matrix_rooms"].append({"id": room_id, "meshtastic_channel": int(meshtastic_channel)})
# Add updated matrix_rooms to new_config
new_config["matrix_rooms"] = config["matrix_rooms"]
new_config["logging"] = config["logging"]
new_config["plugins"] = config["plugins"]
messagebox.showinfo("Success", "Configuration changes saved.")
# Update logging config
config["logging"]["level"] = logging_level_var.get()