mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Slightly improve initial sync hangs (#1140)
This commit is contained in:
parent
4018c97cb6
commit
54e63d88d4
6 changed files with 81 additions and 41 deletions
|
|
@ -595,6 +595,12 @@ function App:startSession()
|
|||
twoWaySync = Settings:get("twoWaySync"),
|
||||
})
|
||||
|
||||
serveSession:setUpdateLoadingTextCallback(function(text: string)
|
||||
self:setState({
|
||||
connectingText = text,
|
||||
})
|
||||
end)
|
||||
|
||||
self.cleanupPrecommit = serveSession:hookPrecommit(function(patch, instanceMap)
|
||||
-- Build new tree for patch
|
||||
self:setState({
|
||||
|
|
@ -759,11 +765,13 @@ function App:startSession()
|
|||
end
|
||||
end
|
||||
|
||||
self:setState({
|
||||
connectingText = "Computing diff view...",
|
||||
})
|
||||
self:setState({
|
||||
appStatus = AppStatus.Confirming,
|
||||
patchTree = PatchTree.build(patch, instanceMap, { "Property", "Current", "Incoming" }),
|
||||
confirmData = {
|
||||
instanceMap = instanceMap,
|
||||
patch = patch,
|
||||
serverInfo = serverInfo,
|
||||
},
|
||||
toolbarIcon = Assets.Images.PluginButton,
|
||||
|
|
@ -874,6 +882,7 @@ function App:render()
|
|||
|
||||
ConfirmingPage = createPageElement(AppStatus.Confirming, {
|
||||
confirmData = self.state.confirmData,
|
||||
patchTree = self.state.patchTree,
|
||||
createPopup = not self.state.guiEnabled,
|
||||
|
||||
onAbort = function()
|
||||
|
|
@ -887,7 +896,9 @@ function App:render()
|
|||
end,
|
||||
}),
|
||||
|
||||
Connecting = createPageElement(AppStatus.Connecting),
|
||||
Connecting = createPageElement(AppStatus.Connecting, {
|
||||
text = self.state.connectingText,
|
||||
}),
|
||||
|
||||
Connected = createPageElement(AppStatus.Connected, {
|
||||
projectName = self.state.projectName,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue