mirror of
https://github.com/danbulant/Nertivia-Client
synced 2026-06-24 17:11:43 +00:00
show load more button when changing channels.
This commit is contained in:
parent
088aedb4f8
commit
2be8f7847f
1 changed files with 8 additions and 3 deletions
|
|
@ -172,8 +172,8 @@ export default {
|
||||||
async backToBottomEvent() {
|
async backToBottomEvent() {
|
||||||
if (this.backToBottomLoading) return;
|
if (this.backToBottomLoading) return;
|
||||||
const channelID = this.selectedChannelID;
|
const channelID = this.selectedChannelID;
|
||||||
const bottomUnloaded = this.bottomUnloaded[this.selectedChannelID];
|
const bottomUnloaded = this.bottomUnloaded;
|
||||||
if (bottomUnloaded === undefined || bottomUnloaded === false) {
|
if (!bottomUnloaded) {
|
||||||
this.scrollDown({force: true});
|
this.scrollDown({force: true});
|
||||||
this.unloadTopMessages();
|
this.unloadTopMessages();
|
||||||
return;
|
return;
|
||||||
|
|
@ -199,10 +199,15 @@ export default {
|
||||||
bus.$on('backToBottom', this.backToBottomEvent)
|
bus.$on('backToBottom', this.backToBottomEvent)
|
||||||
bus.$on('scrollDown', this.scrollDown)
|
bus.$on('scrollDown', this.scrollDown)
|
||||||
bus.$emit('scrolledDown',this.scrolledDown);
|
bus.$emit('scrolledDown',this.scrolledDown);
|
||||||
|
|
||||||
|
if (this.bottomUnloaded) {
|
||||||
|
this.$set(this.loadMoreBottom, 'show', true);
|
||||||
|
}
|
||||||
this.$nextTick( _ => {
|
this.$nextTick( _ => {
|
||||||
this.scrollDown({force: pos, pos: pos});
|
this.scrollDown({force: pos, pos: pos});
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|
@ -278,7 +283,7 @@ export default {
|
||||||
return this.$store.getters.scrollPosition;
|
return this.$store.getters.scrollPosition;
|
||||||
},
|
},
|
||||||
bottomUnloaded() {
|
bottomUnloaded() {
|
||||||
return this.$store.getters.bottomUnloaded;
|
return this.$store.getters.bottomUnloaded[this.selectedChannelID] || false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue