mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 14:01:37 +00:00
Refactor disconnect handling in App:startSession to avoid notifications on disconnect
- Updated the logic to prevent showing a notification when the app disconnects, ensuring that Studio does not switch focus to the viewport during this event.
This commit is contained in:
parent
bda2af3dfb
commit
3038183508
1 changed files with 8 additions and 10 deletions
|
|
@ -695,16 +695,14 @@ function App:startSession()
|
|||
text = tostring(details),
|
||||
timeout = 10,
|
||||
})
|
||||
else
|
||||
self:setState({
|
||||
appStatus = AppStatus.NotConnected,
|
||||
toolbarIcon = Assets.Images.PluginButton,
|
||||
})
|
||||
self:addNotification({
|
||||
text = "Disconnected from session.",
|
||||
timeout = 10,
|
||||
})
|
||||
end
|
||||
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
|
||||
end
|
||||
end)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue