From db902f1fad962fef1d68d9fe2cc1b2a9de9ca631 Mon Sep 17 00:00:00 2001 From: distritic Date: Sun, 18 Oct 2020 19:09:40 +0100 Subject: [PATCH] v0.7: Convert mdtApp.calls to object --- ui/index.html | 6 +++--- ui/script.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/index.html b/ui/index.html index 1f946a3..00c78af 100644 --- a/ui/index.html +++ b/ui/index.html @@ -543,8 +543,8 @@

...

CALL MONITOR

-

No incoming calls.

-
+

No incoming calls.

+
@@ -556,7 +556,7 @@

-

+ diff --git a/ui/script.js b/ui/script.js index f7a80e2..c961ae0 100644 --- a/ui/script.js +++ b/ui/script.js @@ -666,7 +666,7 @@ document.onreadystatechange = () => { time: time, officers: [] } - mdtApp.calls.push(call) + Vue.set(mdtApp.calls, event.data.id, call) } else if (event.data.type == "newCallAttach") { mdtApp.calls[event.data.call].officers.push(event.data.charname) } else if (event.data.type == "newCallDetach") { @@ -691,7 +691,7 @@ document.onreadystatechange = () => { location: null } } - mdtApp.calls.splice(event.data.call, 1); + Vue.delete(mdtApp.calls, event.data.call) } else if (event.data.type == "closeModal") { mdtApp.modal = null; };
#{{call.id}}{{index}} {{call.source}} {{call.details}} {{call.time}}