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()
m.top.optionsAvailable = false
end sub
sub itemContentChanged()
stopLoadingSpinner()
m.top.findNode("UserRow").ItemContent = m.top.itemContent
redraw()
end sub

View File

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

View File

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