Update disconnect handling in App:startSession to show notification on disconnect

- Modified the logic to display a notification when the app disconnects from a session, improving user awareness of connection status.
This commit is contained in:
Joe 2026-01-27 10:09:34 -06:00
parent 3038183508
commit 9622753c24

View file

@ -695,14 +695,16 @@ function App:startSession()
text = tostring(details),
timeout = 10,
})
else
self:setState({
appStatus = AppStatus.NotConnected,
toolbarIcon = Assets.Images.PluginButton,
})
-- Intentionally not showing a notification here to avoid
-- Studio switching focus to the viewport on disconnect
end
else
self:setState({
appStatus = AppStatus.NotConnected,
toolbarIcon = Assets.Images.PluginButton,
})
self:addNotification({
text = "Disconnected from session.",
timeout = 10,
})
end
end
end)