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) {