mirror of
				https://github.com/excalidraw/excalidraw.git
				synced 2025-10-31 10:54:33 +01:00 
			
		
		
		
	fix: show user state only when passed from host (#3050)
This commit is contained in:
		| @@ -483,25 +483,20 @@ export const renderScene = ( | ||||
|     context.stroke(); | ||||
|  | ||||
|     const username = sceneState.remotePointerUsernames[clientId]; | ||||
|     let usernameAndIdleState; | ||||
|     if (hasEmojiSupport) { | ||||
|       usernameAndIdleState = `${username ? `${username} ` : ""}${ | ||||
|         userState === UserIdleState.AWAY | ||||
|           ? "⚫️" | ||||
|           : userState === UserIdleState.IDLE | ||||
|           ? "💤" | ||||
|           : "🟢" | ||||
|       }`; | ||||
|     } else { | ||||
|       usernameAndIdleState = `${username ? `${username}` : ""}${ | ||||
|         userState === UserIdleState.AWAY | ||||
|           ? ` (${UserIdleState.AWAY})` | ||||
|           : userState === UserIdleState.IDLE | ||||
|           ? ` (${UserIdleState.IDLE})` | ||||
|           : "" | ||||
|       }`; | ||||
|  | ||||
|     let idleState = ""; | ||||
|     if (userState === UserIdleState.AWAY) { | ||||
|       idleState = hasEmojiSupport ? "⚫️" : ` (${UserIdleState.AWAY})`; | ||||
|     } else if (userState === UserIdleState.IDLE) { | ||||
|       idleState = hasEmojiSupport ? "💤" : ` (${UserIdleState.IDLE})`; | ||||
|     } else if (userState === UserIdleState.ACTIVE) { | ||||
|       idleState = hasEmojiSupport ? "🟢" : ""; | ||||
|     } | ||||
|  | ||||
|     const usernameAndIdleState = `${ | ||||
|       username ? `${username} ` : "" | ||||
|     }${idleState}`; | ||||
|  | ||||
|     if (!isOutOfBounds && usernameAndIdleState) { | ||||
|       const offsetX = x + width; | ||||
|       const offsetY = y + height; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Aakansha Doshi
					Aakansha Doshi