Skip to content

Commit

Permalink
Merge pull request #254 from antond15/ui-fix
Browse files Browse the repository at this point in the history
fix(ui): Properly set talking states
  • Loading branch information
AvarianKnight authored Jan 11, 2022
2 parents 46b2800 + 5de3886 commit a8ba23f
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions voice-ui/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export default {
});
// stops from toggling voice at the end of talking
let usingUpdated = false
window.addEventListener("message", function(event) {
const data = event.data;
Expand All @@ -56,16 +55,12 @@ export default {
voice.callInfo = data.callInfo;
}
if (data.usingRadio !== voice.usingRadio) {
usingUpdated = true
voice.usingRadio = data.usingRadio
setTimeout(function(){
usingUpdated = false
}, 100)
if (data.usingRadio !== undefined && data.usingRadio !== voice.usingRadio) {
voice.usingRadio = data.usingRadio;
}
if ((data.talking !== undefined) && !voice.usingRadio && !usingUpdated){
voice.talking = data.talking
if ((data.talking !== undefined) && !voice.usingRadio) {
voice.talking = data.talking;
}
if (data.sound && voice.radioEnabled) {
Expand Down

0 comments on commit a8ba23f

Please sign in to comment.