destroyed -> unmounted

This commit is contained in:
Henry Jameson 2021-04-25 13:44:50 +03:00
parent 72956e2343
commit caed89f0ae
12 changed files with 12 additions and 12 deletions

View file

@ -9,7 +9,7 @@ const Bookmarks = {
components: {
Timeline
},
destroyed () {
unmounted () {
this.$store.commit('clearTimeline', { timeline: 'bookmarks' })
}
}

View file

@ -57,7 +57,7 @@ const Chat = {
})
this.setChatLayout()
},
destroyed () {
unmounted () {
window.removeEventListener('scroll', this.handleScroll)
window.removeEventListener('resize', this.handleLayoutChange)
this.unsetChatLayout()

View file

@ -98,7 +98,7 @@ const MediaModal = {
document.addEventListener('keyup', this.handleKeyupEvent)
document.addEventListener('keydown', this.handleKeydownEvent)
},
destroyed () {
unmounted () {
window.removeEventListener('popstate', this.hide)
document.removeEventListener('keyup', this.handleKeyupEvent)
document.removeEventListener('keydown', this.handleKeydownEvent)

View file

@ -29,7 +29,7 @@ const MobilePostStatusButton = {
}
window.addEventListener('resize', this.handleOSK)
},
destroyed () {
unmounted () {
if (this.autohideFloatingPostButton) {
this.deactivateFloatingPostButtonAutohide()
}

View file

@ -17,7 +17,7 @@ export default {
}
this.$store.dispatch('trackPoll', this.pollId)
},
destroyed () {
unmounted () {
this.$store.dispatch('untrackPoll', this.pollId)
},
computed: {

View file

@ -178,7 +178,7 @@ const Popover = {
created () {
document.addEventListener('click', this.onClickOutside)
},
destroyed () {
unmounted () {
document.removeEventListener('click', this.onClickOutside)
this.hidePopover()
}

View file

@ -9,7 +9,7 @@ const PublicAndExternalTimeline = {
created () {
this.$store.dispatch('startFetchingTimeline', { timeline: 'publicAndExternal' })
},
destroyed () {
unmounted () {
this.$store.dispatch('stopFetchingTimeline', 'publicAndExternal')
}
}

View file

@ -9,7 +9,7 @@ const PublicTimeline = {
created () {
this.$store.dispatch('startFetchingTimeline', { timeline: 'public' })
},
destroyed () {
unmounted () {
this.$store.dispatch('stopFetchingTimeline', 'public')
}

View file

@ -18,7 +18,7 @@ const TagTimeline = {
this.$store.dispatch('startFetchingTimeline', { timeline: 'tag', tag: this.tag })
}
},
destroyed () {
unmounted () {
this.$store.dispatch('stopFetchingTimeline', 'tag')
}
}

View file

@ -31,7 +31,7 @@ export default {
created () {
this.refreshRelativeTimeObject()
},
destroyed () {
unmounted () {
clearTimeout(this.interval)
},
methods: {

View file

@ -122,7 +122,7 @@ const Timeline = {
window.addEventListener('keydown', this.handleShortKey)
setTimeout(this.determineVisibleStatuses, 250)
},
destroyed () {
unmounted () {
window.removeEventListener('scroll', this.handleScroll)
window.removeEventListener('keydown', this.handleShortKey)
if (typeof document.hidden !== 'undefined') document.removeEventListener('visibilitychange', this.handleVisibilityChange, false)

View file

@ -46,7 +46,7 @@ const UserProfile = {
this.load(routeParams.name || routeParams.id)
this.tab = get(this.$route, 'query.tab', defaultTabKey)
},
destroyed () {
unmounted () {
this.stopFetching()
},
computed: {