Fix rare crash related to NavBar
This commit is contained in:
1 parent
2c46319b31
commit
e0338a5c05
3 files changed
+23
-18
No files matched your search
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
- Portuguese (Brazil) translations (Thanks to davbrasan)
|
- Portuguese (Brazil) translations (Thanks to davbrasan)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Rare crash related to NavBar
|
||||||
|
|
||||||
## [0.25.3] - 2024-08-14
|
## [0.25.3] - 2024-08-14
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -1,27 +1,20 @@
|
|||||||
function Init()
|
|
||||||
m.titleLabel = m.top.findNode("TitleLabel")
|
|
||||||
m.titleLabelFocused = m.top.findNode("TitleLabelFocused")
|
|
||||||
m.iconPoster = m.top.findNode("IconPoster")
|
|
||||||
m.profileIcon = m.top.findNode("ProfileIcon")
|
|
||||||
end function
|
|
||||||
|
|
||||||
function OnContentSet() as void
|
function OnContentSet() as void
|
||||||
content = m.top.itemContent
|
content = m.top.itemContent
|
||||||
if content = invalid
|
if content = invalid
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
|
||||||
m.titleLabel.text = content.text
|
m.top.titleLabelText = content.text
|
||||||
m.titleLabelFocused.text = content.text
|
m.top.titleLabelFocusedText = content.text
|
||||||
|
|
||||||
isProfile = content.isProfile
|
isProfile = content.isProfile
|
||||||
if isProfile
|
if isProfile
|
||||||
m.iconPoster.visible = false
|
m.top.iconPosterVisible = false
|
||||||
m.profileIcon.visible = true
|
m.top.profileIconVisible = true
|
||||||
else
|
else
|
||||||
m.iconPoster.visible = true
|
m.top.iconPosterVisible = true
|
||||||
m.profileIcon.visible = false
|
m.top.profileIconVisible = false
|
||||||
m.iconPoster.uri = content.icon
|
m.top.iconPosterUri = content.icon
|
||||||
end if
|
end if
|
||||||
|
|
||||||
OnListHasFocusChange()
|
OnListHasFocusChange()
|
||||||
@@ -29,15 +22,15 @@ end function
|
|||||||
|
|
||||||
function OnItemHasFocusChange() as void
|
function OnItemHasFocusChange() as void
|
||||||
itemHasFocus = m.top.itemHasFocus
|
itemHasFocus = m.top.itemHasFocus
|
||||||
m.titleLabelFocused.visible = itemHasFocus
|
m.top.titleLabelFocusedVisible = itemHasFocus
|
||||||
m.titleLabel.visible = not itemHasFocus
|
m.top.titleLabelVisible = not itemHasFocus
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnListHasFocusChange()
|
function OnListHasFocusChange()
|
||||||
listHasFocus = m.top.listHasFocus
|
listHasFocus = m.top.listHasFocus
|
||||||
if not listHasFocus
|
if not listHasFocus
|
||||||
m.titleLabelFocused.visible = false
|
m.top.titleLabelFocusedVisible = false
|
||||||
m.titleLabel.visible = false
|
m.top.titleLabelVisible = false
|
||||||
m.top.opacity = 0.8
|
m.top.opacity = 0.8
|
||||||
else
|
else
|
||||||
OnItemHasFocusChange()
|
OnItemHasFocusChange()
|
||||||
|
|||||||
@@ -3,6 +3,14 @@
|
|||||||
<field id="itemContent" type="node" onChange="OnContentSet" />
|
<field id="itemContent" type="node" onChange="OnContentSet" />
|
||||||
<field id="itemHasFocus" type="boolean" onChange="OnItemHasFocusChange" />
|
<field id="itemHasFocus" type="boolean" onChange="OnItemHasFocusChange" />
|
||||||
<field id="listHasFocus" type="boolean" onChange="OnListHasFocusChange" />
|
<field id="listHasFocus" type="boolean" onChange="OnListHasFocusChange" />
|
||||||
|
|
||||||
|
<field id="titleLabelText" type="string" alias="TitleLabel.text" />
|
||||||
|
<field id="titleLabelFocusedText" type="string" alias="TitleLabelFocused.text" />
|
||||||
|
<field id="titleLabelVisible" type="boolean" alias="TitleLabel.visible" />
|
||||||
|
<field id="titleLabelFocusedVisible" type="boolean" alias="TitleLabelFocused.visible" />
|
||||||
|
<field id="iconPosterVisible" type="boolean" alias="IconPoster.visible" />
|
||||||
|
<field id="iconPosterUri" type="uri" alias="IconPoster.uri" />
|
||||||
|
<field id="profileIconVisible" type="boolean" alias="ProfileIcon.visible" />
|
||||||
</interface>
|
</interface>
|
||||||
|
|
||||||
<children>
|
<children>
|
||||||
|
|||||||
Reference in new issue
Block a user