Some fixes
This commit is contained in:
parent
121dd35c3b
commit
96569e71a3
@ -114,7 +114,7 @@ export default {
|
|||||||
"channel.messages"() {
|
"channel.messages"() {
|
||||||
const el = this.$refs.chat;
|
const el = this.$refs.chat;
|
||||||
|
|
||||||
if (el.scrollHeight - el.scrollTop - el.offsetHeight > 30) {
|
if (!el || el.scrollHeight - el.scrollTop - el.offsetHeight > 30) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,7 +127,11 @@ window.vueMounted = () => {
|
|||||||
let channel;
|
let channel;
|
||||||
|
|
||||||
if (vueApp.activeChannel) {
|
if (vueApp.activeChannel) {
|
||||||
vueApp.activeChannel.channel.firstUnread = vueApp.activeChannel.channel.messages[vueApp.activeChannel.channel.messages.length - 1].id;
|
const {channel: lastChannel} = vueApp.activeChannel;
|
||||||
|
|
||||||
|
if (lastChannel.messages.length > 0) {
|
||||||
|
lastChannel.firstUnread = lastChannel.messages[lastChannel.messages.length - 1].id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inSidebar) {
|
if (inSidebar) {
|
||||||
|
Loading…
Reference in New Issue
Block a user