[Client] Fix bug
This commit is contained in:
parent
3d38356a91
commit
3cd5abe78c
|
@ -1,5 +1,5 @@
|
||||||
<mk-messaging-room>
|
<mk-messaging-room>
|
||||||
<div class="stream" ref="stream">
|
<div class="stream">
|
||||||
<p class="initializing" if={ init }><i class="fa fa-spinner fa-spin"></i>読み込み中</p>
|
<p class="initializing" if={ init }><i class="fa fa-spinner fa-spin"></i>読み込み中</p>
|
||||||
<p class="empty" if={ !init && messages.length == 0 }><i class="fa fa-info-circle"></i>このユーザーとまだ会話したことがありません</p>
|
<p class="empty" if={ !init && messages.length == 0 }><i class="fa fa-info-circle"></i>このユーザーとまだ会話したことがありません</p>
|
||||||
<virtual each={ message, i in messages }>
|
<virtual each={ message, i in messages }>
|
||||||
|
@ -191,12 +191,12 @@
|
||||||
@update!
|
@update!
|
||||||
|
|
||||||
@is-bottom = ~>
|
@is-bottom = ~>
|
||||||
current = @refs.stream.scroll-top + @refs.stream.offset-height
|
current = @root.scroll-top + @root.offset-height
|
||||||
max = @refs.stream.scroll-height
|
max = @root.scroll-height
|
||||||
current > (max - 32)
|
current > (max - 32)
|
||||||
|
|
||||||
@scroll-to-bottom = ~>
|
@scroll-to-bottom = ~>
|
||||||
@refs.stream.scroll-top = @refs.stream.scroll-height
|
@root.scroll-top = @root.scroll-height
|
||||||
|
|
||||||
@notify = (message) ~>
|
@notify = (message) ~>
|
||||||
n = document.create-element \p
|
n = document.create-element \p
|
||||||
|
|
Loading…
Reference in New Issue