mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Enhance TODO list and improve ServeSession synchronization logic
- Updated the TODO list to clarify tasks related to auto-selection and one-shot synchronization, ensuring better tracking of issues. - Introduced a new flag `__oneShotSyncDone` in `ServeSession` to manage synchronization state, preventing further message processing after a one-shot sync is completed. - Improved the handling of incoming changes during the patch visualizer, ensuring user selections are appropriately managed. These changes aim to streamline synchronization processes and enhance user experience during patch management.
This commit is contained in:
parent
63b0b031ff
commit
118c195e64
2 changed files with 18 additions and 8 deletions
|
|
@ -125,6 +125,7 @@ function ServeSession.new(options)
|
|||
__confirmingPatch = nil,
|
||||
__isConfirming = false, -- Explicit confirmation state flag for defense-in-depth
|
||||
__applyingPatch = false, -- Set during reconciler patch application to suppress DescendantAdded
|
||||
__oneShotSyncDone = false,
|
||||
__connections = connections,
|
||||
__precommitCallbacks = {},
|
||||
__postcommitCallbacks = {},
|
||||
|
|
@ -222,6 +223,10 @@ function ServeSession:__onWebSocketMessage(messagesPacket)
|
|||
return
|
||||
end
|
||||
|
||||
if self.__oneShotSyncDone then
|
||||
return
|
||||
end
|
||||
|
||||
Log.info("Received {} messages from Rojo server", #messagesPacket.messages)
|
||||
|
||||
-- Combine all messages into a single patch
|
||||
|
|
@ -879,6 +884,10 @@ function ServeSession:__confirmAndApplyInitialPatch(catchUpPatch, serverInfo)
|
|||
self:__applyPatch(pushPatch)
|
||||
end
|
||||
|
||||
if Settings:get("oneShotSync") then
|
||||
self.__oneShotSyncDone = true
|
||||
end
|
||||
|
||||
-- Send pull items + stage requests to Rojo server
|
||||
local hasPullChanges = self.__twoWaySync and not PatchSet.isEmpty(pullPatch)
|
||||
local hasStageIds = #stageIds > 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue