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
03f6112a
Commit
03f6112a
authored
Aug 05, 2021
by
Kim Peace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed to finish collaboration when clean up collaboration message received
parent
3ee7e398
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
public_new/js/common/common.js
+3
-3
public_new/js/sockets/chat-websocket-message.js
+9
-1
public_new/js/views/chats/chat-room-message.js
+2
-0
No files found.
public_new/js/common/common.js
View file @
03f6112a
...
@@ -169,9 +169,9 @@ Common.startCollaboration = function (collaborationType) {
...
@@ -169,9 +169,9 @@ Common.startCollaboration = function (collaborationType) {
Common
.
dismissLoadingIndicator
();
Common
.
dismissLoadingIndicator
();
return
;
return
;
}
}
const
sendData
=
DATA_MESSAGE_SCHEME
+
FINISH_ALL_COLLABORATION_SIGNAL
;
CHAT_SOCKET
.
emitCreateMessage
(
SOCKET_KEY
.
CREATE_MESSAGE
,
sendData
);
NativeBridgeDelegate
.
finishAllCollaboration
();
}
}
CHAT_SOCKET
.
emitCollaborationFinishMessage
();
NativeBridgeDelegate
.
finishAllCollaboration
();
NativeBridgeDelegate
.
startCollaboration
(
collaborationType
);
NativeBridgeDelegate
.
startCollaboration
(
collaborationType
);
};
};
public_new/js/sockets/chat-websocket-message.js
View file @
03f6112a
...
@@ -19,6 +19,10 @@ CHAT_SOCKET.handleMessage = function (message, roomName, socketKey) {
...
@@ -19,6 +19,10 @@ CHAT_SOCKET.handleMessage = function (message, roomName, socketKey) {
DATA_MESSAGE_SCHEME
+
FINISH_ALL_COLLABORATION_SIGNAL
DATA_MESSAGE_SCHEME
+
FINISH_ALL_COLLABORATION_SIGNAL
)
{
)
{
CHAT_SOCKET
.
cleanUpCollaborationMessage
();
CHAT_SOCKET
.
cleanUpCollaborationMessage
();
if
(
typeof
CoviewBridge
!==
"undefined"
)
{
CoviewBridge
.
finishCollaboration
();
}
return
;
return
;
}
}
...
@@ -120,6 +124,7 @@ CHAT_SOCKET.renderCollaborationMessage = function (
...
@@ -120,6 +124,7 @@ CHAT_SOCKET.renderCollaborationMessage = function (
createdAtDay
:
messageTime
.
createdAtDay
,
createdAtDay
:
messageTime
.
createdAtDay
,
createdAtTime
:
messageTime
.
createdAtTime
,
createdAtTime
:
messageTime
.
createdAtTime
,
isOtherYear
:
false
,
isOtherYear
:
false
,
collaborationJoinMessage
:
getLocalizedString
(
"message_join"
),
});
});
};
};
...
@@ -176,8 +181,11 @@ CHAT_SOCKET.getUserInfoList = function (userID) {
...
@@ -176,8 +181,11 @@ CHAT_SOCKET.getUserInfoList = function (userID) {
return
JSON
.
parse
(
NativeBridgeDataSource
.
getUserInfoList
(
userID
));
return
JSON
.
parse
(
NativeBridgeDataSource
.
getUserInfoList
(
userID
));
};
};
CHAT_SOCKET
.
cleanUpCollaborationMessage
=
function
()
{
CHAT_SOCKET
.
cleanUpCollaborationMessage
=
function
(
exceptFirst
=
false
)
{
$
(
".collabo_area.start"
).
each
(
function
(
index
,
collaborationMessage
)
{
$
(
".collabo_area.start"
).
each
(
function
(
index
,
collaborationMessage
)
{
if
(
exceptFirst
&&
index
===
0
)
{
return
;
}
$
(
collaborationMessage
).
removeClass
(
"start"
);
$
(
collaborationMessage
).
removeClass
(
"start"
);
$
(
collaborationMessage
).
addClass
(
"end"
);
$
(
collaborationMessage
).
addClass
(
"end"
);
$
(
collaborationMessage
).
addClass
(
"disable"
);
$
(
collaborationMessage
).
addClass
(
"disable"
);
...
...
public_new/js/views/chats/chat-room-message.js
View file @
03f6112a
...
@@ -98,6 +98,8 @@ ChatRoom.loadMessages = function (joinRoomID, joinRoomName) {
...
@@ -98,6 +98,8 @@ ChatRoom.loadMessages = function (joinRoomID, joinRoomName) {
let
messages
=
NativeBridgeDataSource
.
getMessagesByRoomID
(
roomID
);
let
messages
=
NativeBridgeDataSource
.
getMessagesByRoomID
(
roomID
);
ChatRoom
.
prependMessage
(
messages
);
ChatRoom
.
prependMessage
(
messages
);
CHAT_SOCKET
.
cleanUpCollaborationMessage
(
true
);
window
.
addEventListener
(
window
.
addEventListener
(
"load"
,
"load"
,
function
(
event
)
{
function
(
event
)
{
...
...
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