Stop scroll position control when lazy loading
This commit is contained in:
parent
ce4780f587
commit
7d11dcf18d
|
@ -105,14 +105,14 @@ export default {
|
||||||
if (this.$store.state.TimelineSpace.SideMenu.unreadHomeTimeline && this.heading) {
|
if (this.$store.state.TimelineSpace.SideMenu.unreadHomeTimeline && this.heading) {
|
||||||
this.$store.commit('TimelineSpace/SideMenu/changeUnreadHomeTimeline', false)
|
this.$store.commit('TimelineSpace/SideMenu/changeUnreadHomeTimeline', false)
|
||||||
}
|
}
|
||||||
if (!this.heading) {
|
if (!this.heading && !this.lazyLoading) {
|
||||||
const el = document.getElementById('scroller')
|
const el = document.getElementById('scroller')
|
||||||
this.scroll = new ScrollPosition(el)
|
this.scroll = new ScrollPosition(el)
|
||||||
this.scroll.prepare()
|
this.scroll.prepare()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updated() {
|
updated() {
|
||||||
if (this.scroll && !this.heading) {
|
if (this.scroll && !this.heading && !this.lazyLoading) {
|
||||||
this.scroll.restore()
|
this.scroll.restore()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -94,14 +94,14 @@ export default {
|
||||||
if (this.$store.state.TimelineSpace.SideMenu.unreadLocalTimeline && this.heading) {
|
if (this.$store.state.TimelineSpace.SideMenu.unreadLocalTimeline && this.heading) {
|
||||||
this.$store.commit('TimelineSpace/SideMenu/changeUnreadLocalTimeline', false)
|
this.$store.commit('TimelineSpace/SideMenu/changeUnreadLocalTimeline', false)
|
||||||
}
|
}
|
||||||
if (!this.heading) {
|
if (!this.heading && !this.lazyLoading) {
|
||||||
const el = document.getElementById('scroller')
|
const el = document.getElementById('scroller')
|
||||||
this.scroll = new ScrollPosition(el)
|
this.scroll = new ScrollPosition(el)
|
||||||
this.scroll.prepare()
|
this.scroll.prepare()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updated() {
|
updated() {
|
||||||
if (this.scroll && !this.heading) {
|
if (this.scroll && !this.heading && !this.lazyLoading) {
|
||||||
this.scroll.restore()
|
this.scroll.restore()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -89,14 +89,14 @@ export default {
|
||||||
if (this.$store.state.TimelineSpace.SideMenu.unreadMentions && this.heading) {
|
if (this.$store.state.TimelineSpace.SideMenu.unreadMentions && this.heading) {
|
||||||
this.$store.commit('TimelineSpace/SideMenu/changeUnreadMentions', false)
|
this.$store.commit('TimelineSpace/SideMenu/changeUnreadMentions', false)
|
||||||
}
|
}
|
||||||
if (!this.heading) {
|
if (!this.heading && !this.lazyLoading) {
|
||||||
const el = document.getElementById('scroller')
|
const el = document.getElementById('scroller')
|
||||||
this.scroll = new ScrollPosition(el)
|
this.scroll = new ScrollPosition(el)
|
||||||
this.scroll.prepare()
|
this.scroll.prepare()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updated() {
|
updated() {
|
||||||
if (this.scroll && !this.heading) {
|
if (this.scroll && !this.heading && !this.lazyLoading) {
|
||||||
this.scroll.restore()
|
this.scroll.restore()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -91,14 +91,14 @@ export default {
|
||||||
if (this.$store.state.TimelineSpace.SideMenu.unreadNotifications && this.heading) {
|
if (this.$store.state.TimelineSpace.SideMenu.unreadNotifications && this.heading) {
|
||||||
this.$store.commit('TimelineSpace/SideMenu/changeUnreadNotifications', false)
|
this.$store.commit('TimelineSpace/SideMenu/changeUnreadNotifications', false)
|
||||||
}
|
}
|
||||||
if (!this.heading) {
|
if (!this.heading && !this.lazyLoading) {
|
||||||
const el = document.getElementById('scroller')
|
const el = document.getElementById('scroller')
|
||||||
this.scroll = new ScrollPosition(el)
|
this.scroll = new ScrollPosition(el)
|
||||||
this.scroll.prepare()
|
this.scroll.prepare()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updated() {
|
updated() {
|
||||||
if (this.scroll && !this.heading) {
|
if (this.scroll && !this.heading && !this.lazyLoading) {
|
||||||
this.scroll.restore()
|
this.scroll.restore()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -95,14 +95,14 @@ export default {
|
||||||
if (this.$store.state.TimelineSpace.SideMenu.unreadPublicTimeline && this.heading) {
|
if (this.$store.state.TimelineSpace.SideMenu.unreadPublicTimeline && this.heading) {
|
||||||
this.$store.commit('TimelineSpace/SideMenu/changeUnreadPublicTimeline', false)
|
this.$store.commit('TimelineSpace/SideMenu/changeUnreadPublicTimeline', false)
|
||||||
}
|
}
|
||||||
if (!this.heading) {
|
if (!this.heading && !this.lazyLoading) {
|
||||||
const el = document.getElementById('scroller')
|
const el = document.getElementById('scroller')
|
||||||
this.scroll = new ScrollPosition(el)
|
this.scroll = new ScrollPosition(el)
|
||||||
this.scroll.prepare()
|
this.scroll.prepare()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updated() {
|
updated() {
|
||||||
if (this.scroll && !this.heading) {
|
if (this.scroll && !this.heading && !this.lazyLoading) {
|
||||||
this.scroll.restore()
|
this.scroll.restore()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue