mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 10:37:35 +02:00
Clear already logged messages.
Signed-off-by: Armored Dragon <publicmail@armoreddragon.com>
This commit is contained in:
parent
0d5eb93241
commit
7b50f9184f
2 changed files with 6 additions and 2 deletions
|
@ -152,10 +152,12 @@
|
||||||
switch (event.action) {
|
switch (event.action) {
|
||||||
case "erase_history":
|
case "erase_history":
|
||||||
Settings.setValue("ArmoredChat-Messages", []);
|
Settings.setValue("ArmoredChat-Messages", []);
|
||||||
|
_emitEvent({
|
||||||
|
type: "clear_messages",
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "initialized":
|
case "initialized":
|
||||||
// https://github.com/overte-org/overte/issues/824
|
// 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)
|
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 });
|
_emitEvent({ type: "avatar_connected", ...message });
|
||||||
}, 1500);
|
}, 1500);
|
||||||
}
|
}
|
||||||
|
|
||||||
function _loadSettings() {
|
function _loadSettings() {
|
||||||
message_history.forEach((message) => {
|
message_history.forEach((message) => {
|
||||||
delete message.action;
|
delete message.action;
|
||||||
|
|
|
@ -452,6 +452,9 @@ Rectangle {
|
||||||
case "avatar_connected":
|
case "avatar_connected":
|
||||||
addMessage("SYSTEM", message.message, `[ ${time} - ${date} ]`, "domain", "notification");
|
addMessage("SYSTEM", message.message, `[ ${time} - ${date} ]`, "domain", "notification");
|
||||||
break;
|
break;
|
||||||
|
case "clear_messages":
|
||||||
|
local.clear()
|
||||||
|
domain.clear()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue