fix notifications
This commit is contained in:
parent
986c453702
commit
09a4d963d4
|
@ -98,9 +98,13 @@ const Notifications = {
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.scrollerRef = this.$refs.root.closest('.column.-scrollable')
|
this.scrollerRef = this.$refs.root.closest('.column.-scrollable')
|
||||||
|
if (!this.scrollerRef) {
|
||||||
|
this.scrollerRef = this.$refs.root.closest('.mobile-notifications')
|
||||||
|
}
|
||||||
this.scrollerRef.addEventListener('scroll', this.updateScrollPosition)
|
this.scrollerRef.addEventListener('scroll', this.updateScrollPosition)
|
||||||
},
|
},
|
||||||
unmounted () {
|
unmounted () {
|
||||||
|
if (!this.scrollerRef) return
|
||||||
this.scrollerRef.removeEventListener('scroll', this.updateScrollPosition)
|
this.scrollerRef.removeEventListener('scroll', this.updateScrollPosition)
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -112,6 +116,16 @@ const Notifications = {
|
||||||
FaviconService.clearFaviconBadge()
|
FaviconService.clearFaviconBadge()
|
||||||
this.$store.dispatch('setPageTitle', '')
|
this.$store.dispatch('setPageTitle', '')
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
teleportTarget () {
|
||||||
|
// handle scroller change
|
||||||
|
this.scrollerRef.removeEventListener('scroll', this.updateScrollPosition)
|
||||||
|
this.scrollerRef = this.$refs.root.closest('.column.-scrollable')
|
||||||
|
if (!this.scrollerRef) {
|
||||||
|
this.scrollerRef = this.$refs.root.closest('.mobile-notifications')
|
||||||
|
}
|
||||||
|
this.scrollerRef.addEventListener('scroll', this.updateScrollPosition)
|
||||||
|
this.updateScrollPosition()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Loading…
Reference in New Issue