mirror of
				https://github.com/excalidraw/excalidraw.git
				synced 2025-11-03 20:34:40 +01:00 
			
		
		
		
	fix: emit scene init event after reconnecting
This commit is contained in:
		@@ -335,11 +335,13 @@ class Collab extends PureComponent<Props, CollabState> {
 | 
			
		||||
      this.reportActive();
 | 
			
		||||
      this.portal.socket.connect();
 | 
			
		||||
      this.portal.socketInitialized = true;
 | 
			
		||||
      this.setIsCollaborationPaused(false);
 | 
			
		||||
 | 
			
		||||
      if (callback) {
 | 
			
		||||
        callback();
 | 
			
		||||
      }
 | 
			
		||||
      this.portal.socket.emit(WS_SCENE_EVENT_TYPES.INIT);
 | 
			
		||||
      this.portal.socket.once("client-broadcast", () => {
 | 
			
		||||
        this.setIsCollaborationPaused(false);
 | 
			
		||||
        if (callback) {
 | 
			
		||||
          callback();
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -497,7 +497,7 @@ const ExcalidrawWrapper = () => {
 | 
			
		||||
          case !document.hidden && collabAPI.isPaused():
 | 
			
		||||
            excalidrawAPI.setToast({
 | 
			
		||||
              message: t("toast.reconnectRoomServer"),
 | 
			
		||||
              duration: 100000,
 | 
			
		||||
              duration: Infinity,
 | 
			
		||||
              closable: true,
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user