From f117793eacb149e5c0330c66605080666de5cec2 Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Tue, 24 Jun 2025 13:00:38 +0200 Subject: [PATCH] Added autoupdate to vodia switcher --- public/assets/js/xinon-vodia-identity.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/assets/js/xinon-vodia-identity.js b/public/assets/js/xinon-vodia-identity.js index 73f64aa12..d5f792435 100644 --- a/public/assets/js/xinon-vodia-identity.js +++ b/public/assets/js/xinon-vodia-identity.js @@ -1,11 +1,13 @@ /* Vodia Outbound Identity */ +var vodia_identity_switcher_timer; var vodia_identity = null; getVodiaIdentity(); async function getVodiaIdentity() { - + clearTimeout(vodia_identity_switcher_timer); + if(!$("#vodia-identity-switcher .phone-icon").hasClass("fa-spin")) { $("#vodia-identity-switcher .phone-icon").addClass("fa-spin text-warning"); } @@ -104,6 +106,8 @@ async function getVodiaIdentity() { $("#vodia-identity-switcher .phone-icon").addClass("fa-bounce"); setTimeout(() => { $("#vodia-identity-switcher .phone-icon").removeClass("fa-bounce"); }, 800); + vodia_identity_switcher_timer = setTimeout(() => {getVodiaIdentity()}, 30000); // + } function addVodiaIdentityListItem(number, number_display, name, color) {