From 9622753c249ded575f2b02924109a3cf023f7516 Mon Sep 17 00:00:00 2001 From: Joe Date: Tue, 27 Jan 2026 10:09:34 -0600 Subject: [PATCH] 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. --- plugin/src/App/init.lua | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/plugin/src/App/init.lua b/plugin/src/App/init.lua index d10bde6a..48cf72ef 100644 --- a/plugin/src/App/init.lua +++ b/plugin/src/App/init.lua @@ -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)