forked from rojo-rbx/rojo
Slightly improve initial sync hangs (#1140)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user