Skip to content

Commit

Permalink
End polling for case details after conversation has been created.
Browse files Browse the repository at this point in the history
  • Loading branch information
metroid-samus committed Dec 18, 2024
1 parent d7d9d9c commit c680a9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dispatch/static/dispatch/src/case/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,14 @@ const actions = {
.then((response) => {
commit("SET_SELECTED", response.data)
commit("SET_SELECTED_LOADING", false)
this.interval = setInterval(function () {
var interval = setInterval(function () {
if (state.selected.id) {
dispatch("get")
}

// TODO this is fragile but we don't set anything as "created"
if (state.selected.conversation) {
clearInterval(this.interval)
clearInterval(interval)
}
}, 5000)
})
Expand Down

0 comments on commit c680a9f

Please sign in to comment.