mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
changed where online users name logic is so it catches all cases.
This commit is contained in:
parent
70d0af519b
commit
611916119a
1 changed files with 8 additions and 6 deletions
|
@ -21,16 +21,14 @@ define [
|
|||
# Don't store myself
|
||||
continue
|
||||
# Store data in the same format returned by clientTracking.clientUpdated
|
||||
if user.first_name?.length == 0 and user.last_name.length == 0
|
||||
name = user.email
|
||||
else
|
||||
name = "#{user.first_name} #{user.last_name}"
|
||||
|
||||
|
||||
|
||||
@$scope.onlineUsers[user.client_id] = {
|
||||
id: user.client_id
|
||||
user_id: user.user_id
|
||||
email: user.email
|
||||
name: name
|
||||
name: user.first_name
|
||||
doc_id: user.cursorData?.doc_id
|
||||
row: user.cursorData?.row
|
||||
column: user.cursorData?.column
|
||||
|
@ -57,8 +55,12 @@ define [
|
|||
for client_id, user of @$scope.onlineUsers
|
||||
if user.doc_id?
|
||||
user.doc = @ide.fileTreeManager.findEntityById(user.doc_id)
|
||||
if user.first_name?.length == 0 and user.last_name.length == 0
|
||||
user.name = user.email
|
||||
else
|
||||
user.name = "#{user.first_name} #{user.last_name}"
|
||||
@$scope.onlineUsersArray.push user
|
||||
|
||||
|
||||
@$scope.onlineUserCursorHighlights = {}
|
||||
for client_id, client of @$scope.onlineUsers
|
||||
doc_id = client.doc_id
|
||||
|
|
Loading…
Reference in a new issue