fix: weird null error

Idk how but root somehow becomes null, probably due to async destruction
This commit is contained in:
2 * r + 2 * t 2026-06-07 17:01:22 +10:00
parent 72dc5a8b93
commit 917a06f815
2 changed files with 4 additions and 4 deletions

View file

@ -38,8 +38,8 @@ ItemList {
StateLayer { StateLayer {
radius: Tokens.rounding.extraSmall radius: Tokens.rounding.extraSmall
bottomLeftRadius: device.index === root.list.count - 1 ? Tokens.rounding.extraLarge : radius bottomLeftRadius: device.index === root?.list.count - 1 ? Tokens.rounding.extraLarge : radius
bottomRightRadius: device.index === root.list.count - 1 ? Tokens.rounding.extraLarge : radius bottomRightRadius: device.index === root?.list.count - 1 ? Tokens.rounding.extraLarge : radius
onClicked: root.selected(device.modelData) onClicked: root.selected(device.modelData)
} }

View file

@ -106,8 +106,8 @@ PageBase {
StateLayer { StateLayer {
radius: Tokens.rounding.extraSmall radius: Tokens.rounding.extraSmall
bottomLeftRadius: newDevice.index === deviceList.list.count - 1 ? Tokens.rounding.extraLarge : radius bottomLeftRadius: newDevice.index === deviceList?.list.count - 1 ? Tokens.rounding.extraLarge : radius
bottomRightRadius: newDevice.index === deviceList.list.count - 1 ? Tokens.rounding.extraLarge : radius bottomRightRadius: newDevice.index === deviceList?.list.count - 1 ? Tokens.rounding.extraLarge : radius
disabled: newDevice.modelData?.pairing ?? false disabled: newDevice.modelData?.pairing ?? false
onClicked: { onClicked: {