diff --git a/apps/mobile/src/features/connection/CloudEnvironmentRows.tsx b/apps/mobile/src/features/connection/CloudEnvironmentRows.tsx index b1748b1938c7a0b5ec854e42adbbdd6ac93337ad..dbb1dca068d45625caf356a6dc71850186b501d3 100644 --- a/apps/mobile/src/features/connection/CloudEnvironmentRows.tsx +++ b/apps/mobile/src/features/connection/CloudEnvironmentRows.tsx @@ -235,6 +235,12 @@ function ConnectedCloudEnvironmentRow(props: { ); const unsupported = props.environment.connectionState === "unsupported"; const enabled = props.environment.isEnabled && !unsupported; + // Discovery empties its map on every refresh; hold the last descriptor seen + // so the glyph does not blink back to the generic one each time. + const [lastDescriptor, setLastDescriptor] = useState(props.descriptor); + if (props.descriptor !== undefined && props.descriptor !== lastDescriptor) { + setLastDescriptor(props.descriptor); + } return ( } @@ -1571,8 +1574,8 @@ function SavedBackendListRow({ {subtitleText} - {unsupported && environment.connection.error - ? environment.connection.error + {unsupported + ? (environment.connection.error ?? connectionStatusText(environment.connection)) : enabled ? connectionStatusText(environment.connection) : "Switched off"}