use JFScene spinner instead of progress dialog

This commit is contained in:
Charles Ewert 2023-11-22 15:28:10 -05:00
parent 4e81dda7ad
commit c714bc29e5
3 changed files with 9 additions and 12 deletions

View File

@ -1,8 +1,11 @@
import "pkg:/source/utils/misc.bs"
sub init() sub init()
m.top.optionsAvailable = false m.top.optionsAvailable = false
end sub end sub
sub itemContentChanged() sub itemContentChanged()
stopLoadingSpinner()
m.top.findNode("UserRow").ItemContent = m.top.itemContent m.top.findNode("UserRow").ItemContent = m.top.itemContent
redraw() redraw()
end sub end sub

View File

@ -16,12 +16,9 @@ function LoginFlow()
invalidServer = true invalidServer = true
if not startOver if not startOver
' Show Connecting to Server spinner m.scene.isLoading = true
dialog = createObject("roSGNode", "ProgressDialog")
dialog.title = tr("Connecting to Server")
m.scene.dialog = dialog
invalidServer = ServerInfo().Error invalidServer = ServerInfo().Error
dialog.close = true m.scene.isLoading = false
end if end if
m.serverSelection = "Saved" m.serverSelection = "Saved"
@ -302,10 +299,7 @@ function CreateServerGroup()
else if type(msg) = "roSGNodeEvent" else if type(msg) = "roSGNodeEvent"
node = msg.getNode() node = msg.getNode()
if node = "submit" if node = "submit"
' Show Connecting to Server spinner m.scene.isLoading = true
dialog = createObject("roSGNode", "ProgressDialog")
dialog.title = tr("Connecting to Server")
m.scene.dialog = dialog
serverUrl = inferServerUrl(screen.serverUrl) serverUrl = inferServerUrl(screen.serverUrl)
@ -321,7 +315,7 @@ function CreateServerGroup()
end if end if
set_setting("server", serverUrl) set_setting("server", serverUrl)
end if end if
dialog.close = true m.scene.isLoading = false
if isConnected = false or serverInfoResult = invalid if isConnected = false or serverInfoResult = invalid
' Maybe don't unset setting, but offer as a prompt ' Maybe don't unset setting, but offer as a prompt

View File

@ -462,8 +462,8 @@ sub startLoadingSpinner(disableRemote = true as boolean)
end if end if
if not m.scene.isLoading if not m.scene.isLoading
m.scene.isLoading = true
m.scene.disableRemote = disableRemote m.scene.disableRemote = disableRemote
m.scene.isLoading = true
end if end if
end sub end sub
@ -473,8 +473,8 @@ sub stopLoadingSpinner()
end if end if
if m.scene.isLoading if m.scene.isLoading
m.scene.isLoading = false
m.scene.disableRemote = false m.scene.disableRemote = false
m.scene.isLoading = false
end if end if
end sub end sub