mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 14:01:37 +00:00
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:
parent
3038183508
commit
9622753c24
1 changed files with 10 additions and 8 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue