johnnynotsolucky / vue-intercom

An Intercom Javascript API plugin for Vue.js
MIT License
66 stars 20 forks source link

this.$intercom.visible does not trigger after a new boot #18

Closed jobezic closed 3 years ago

jobezic commented 5 years ago

If I shutdown Intercom through this.$intercom.shutdown() when leaving the page where it's used and then I boot it again, the this.$intercom.visible does not trigger more. This is the chunk of code from my case:

computed: {
    isVisible() {
      return this.$intercom.visible
    }
  },
  watch: {
    isVisible() {
      console.log('triggered!')
    }
  },
  mounted() {
    this.$intercom.boot({
      user_id: this.userId,
      name: this.name,
      email: this.email
    })

    this.$intercom.show()
  },
  beforeDestroy() {
    this.$intercom.shutdown()
  }