Co-authored-by: syuilo <syuilotan@yahoo.co.jp>
This commit is contained in:
Aya Morisawa 2018-12-27 01:24:57 +09:00
parent 5174e16f7b
commit 21f8dbf2de
No known key found for this signature in database
GPG key ID: 3E64865D70D579F2
7 changed files with 104 additions and 56 deletions

View file

@ -79,6 +79,7 @@ export default Vue.extend({
this.connection.on('message', this.onMessage);
this.connection.on('read', this.onRead);
this.connection.on('deleted', this.onDeleted);
if (this.isNaked) {
window.addEventListener('scroll', this.onScroll, { passive: true });
@ -204,6 +205,13 @@ export default Vue.extend({
}
},
onDeleted(id) {
const msg = this.messages.find(m => m.id === id);
if (msg) {
this.messages = this.messages.filter(m => m.id !== msg.id);
}
},
isBottom() {
const asobi = 64;
const current = this.isNaked