Clear already logged messages.

Signed-off-by: Armored Dragon <publicmail@armoreddragon.com>
This commit is contained in:
Armored Dragon 2024-05-18 14:12:00 -05:00
parent 0d5eb93241
commit 7b50f9184f
No known key found for this signature in database
GPG key ID: C7207ACC3382AD8B
2 changed files with 6 additions and 2 deletions

View file

@ -152,10 +152,12 @@
switch (event.action) {
case "erase_history":
Settings.setValue("ArmoredChat-Messages", []);
_emitEvent({
type: "clear_messages",
});
break;
}
break;
case "initialized":
// https://github.com/overte-org/overte/issues/824
chat_overlay_window.visible = app_is_visible; // The "visible" field in the Desktop.createWindow does not seem to work. Force set it to the initial state (false)
@ -201,7 +203,6 @@
_emitEvent({ type: "avatar_connected", ...message });
}, 1500);
}
function _loadSettings() {
message_history.forEach((message) => {
delete message.action;

View file

@ -452,6 +452,9 @@ Rectangle {
case "avatar_connected":
addMessage("SYSTEM", message.message, `[ ${time} - ${date} ]`, "domain", "notification");
break;
case "clear_messages":
local.clear()
domain.clear()
}
}