Stop scroll position control when lazy loading

This commit is contained in:
AkiraFukushima 2021-07-25 22:33:19 +09:00
parent ce4780f587
commit 7d11dcf18d
No known key found for this signature in database
GPG Key ID: B6E51BAC4DE1A957
5 changed files with 10 additions and 10 deletions

View File

@ -105,14 +105,14 @@ export default {
if (this.$store.state.TimelineSpace.SideMenu.unreadHomeTimeline && this.heading) {
this.$store.commit('TimelineSpace/SideMenu/changeUnreadHomeTimeline', false)
}
if (!this.heading) {
if (!this.heading && !this.lazyLoading) {
const el = document.getElementById('scroller')
this.scroll = new ScrollPosition(el)
this.scroll.prepare()
}
},
updated() {
if (this.scroll && !this.heading) {
if (this.scroll && !this.heading && !this.lazyLoading) {
this.scroll.restore()
}
},

View File

@ -94,14 +94,14 @@ export default {
if (this.$store.state.TimelineSpace.SideMenu.unreadLocalTimeline && this.heading) {
this.$store.commit('TimelineSpace/SideMenu/changeUnreadLocalTimeline', false)
}
if (!this.heading) {
if (!this.heading && !this.lazyLoading) {
const el = document.getElementById('scroller')
this.scroll = new ScrollPosition(el)
this.scroll.prepare()
}
},
updated() {
if (this.scroll && !this.heading) {
if (this.scroll && !this.heading && !this.lazyLoading) {
this.scroll.restore()
}
},

View File

@ -89,14 +89,14 @@ export default {
if (this.$store.state.TimelineSpace.SideMenu.unreadMentions && this.heading) {
this.$store.commit('TimelineSpace/SideMenu/changeUnreadMentions', false)
}
if (!this.heading) {
if (!this.heading && !this.lazyLoading) {
const el = document.getElementById('scroller')
this.scroll = new ScrollPosition(el)
this.scroll.prepare()
}
},
updated() {
if (this.scroll && !this.heading) {
if (this.scroll && !this.heading && !this.lazyLoading) {
this.scroll.restore()
}
},

View File

@ -91,14 +91,14 @@ export default {
if (this.$store.state.TimelineSpace.SideMenu.unreadNotifications && this.heading) {
this.$store.commit('TimelineSpace/SideMenu/changeUnreadNotifications', false)
}
if (!this.heading) {
if (!this.heading && !this.lazyLoading) {
const el = document.getElementById('scroller')
this.scroll = new ScrollPosition(el)
this.scroll.prepare()
}
},
updated() {
if (this.scroll && !this.heading) {
if (this.scroll && !this.heading && !this.lazyLoading) {
this.scroll.restore()
}
},

View File

@ -95,14 +95,14 @@ export default {
if (this.$store.state.TimelineSpace.SideMenu.unreadPublicTimeline && this.heading) {
this.$store.commit('TimelineSpace/SideMenu/changeUnreadPublicTimeline', false)
}
if (!this.heading) {
if (!this.heading && !this.lazyLoading) {
const el = document.getElementById('scroller')
this.scroll = new ScrollPosition(el)
this.scroll.prepare()
}
},
updated() {
if (this.scroll && !this.heading) {
if (this.scroll && !this.heading && !this.lazyLoading) {
this.scroll.restore()
}
},