Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
chat_webview
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abookCommunication
chat_webview
Commits
79770beb
Commit
79770beb
authored
Aug 27, 2021
by
Kim Peace
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into debug/console_logs
parents
a8e6659a
806d1193
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
public_new/js/sockets/chat-websocket-message.js
+4
-2
public_new/js/views/chats/chat-room.js
+3
-3
No files found.
public_new/js/sockets/chat-websocket-message.js
View file @
79770beb
...
...
@@ -79,8 +79,10 @@ CHAT_SOCKET.handleMessage = function (
if
(
typeof
ChatRoom
!==
"undefined"
)
{
// 画像、動画の描画を待ってからスクロール
setTimeout
(
function
()
{
ChatRoom
.
scrollToBottom
();
},
300
);
let
jQueryMessages
=
$
(
"#messages"
);
ChatRoom
.
waitForLoadingImage
(
jQueryMessages
,
ChatRoom
.
scrollToBottom
);
ChatRoom
.
waitForLoadingVideo
(
jQueryMessages
,
ChatRoom
.
scrollToBottom
);
},
0
);
}
else
{
Common
.
dismissLoadingIndicator
();
}
...
...
public_new/js/views/chats/chat-room.js
View file @
79770beb
...
...
@@ -10,10 +10,10 @@ window.onscroll = function () {
return
;
}
beforeScroll
=
window
.
scrollY
;
ChatRoom
.
pre
pendMessageWhenScrollIfNeeded
();
ChatRoom
.
ap
pendMessageWhenScrollIfNeeded
();
};
ChatRoom
.
pre
pendMessageWhenScrollIfNeeded
=
function
()
{
ChatRoom
.
ap
pendMessageWhenScrollIfNeeded
=
function
()
{
const
beforeHeight
=
$
(
".room_container"
).
height
();
messageCount
=
$
(
".chat_message"
).
length
;
if
(
$
(
this
).
scrollTop
()
===
0
&&
messageCount
>=
PagingSize
.
MESSAGE
)
{
...
...
@@ -27,7 +27,7 @@ ChatRoom.prependMessageWhenScrollIfNeeded = function () {
}
ChatRoom
.
loadNewMessage
().
then
((
messages
)
=>
{
// prepend message
ChatRoom
.
pre
pendMessage
(
messages
);
ChatRoom
.
ap
pendMessage
(
messages
);
// hide loading indicator
if
(
typeof
loader
!==
"undefined"
)
{
loader
.
remove
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment