mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +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),
|
text = tostring(details),
|
||||||
timeout = 10,
|
timeout = 10,
|
||||||
})
|
})
|
||||||
else
|
else
|
||||||
self:setState({
|
self:setState({
|
||||||
appStatus = AppStatus.NotConnected,
|
appStatus = AppStatus.NotConnected,
|
||||||
toolbarIcon = Assets.Images.PluginButton,
|
toolbarIcon = Assets.Images.PluginButton,
|
||||||
})
|
})
|
||||||
self:addNotification({
|
-- Intentionally not showing a notification here to avoid
|
||||||
text = "Disconnected from session.",
|
-- Studio switching focus to the viewport on disconnect
|
||||||
timeout = 10,
|
end
|
||||||
})
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue