diff --git a/CHANGELOG.md b/CHANGELOG.md
index 04add9a7..b8a36bcd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Portuguese (Brazil) translations (Thanks to davbrasan)
+### Fixed
+
+- Rare crash related to NavBar
+
## [0.25.3] - 2024-08-14
### Fixed
diff --git a/playlet-lib/src/components/NavBar/NavBarComponent.bs b/playlet-lib/src/components/NavBar/NavBarComponent.bs
index 3bf93ffd..080eb6a7 100644
--- a/playlet-lib/src/components/NavBar/NavBarComponent.bs
+++ b/playlet-lib/src/components/NavBar/NavBarComponent.bs
@@ -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
content = m.top.itemContent
if content = invalid
return
end if
- m.titleLabel.text = content.text
- m.titleLabelFocused.text = content.text
+ m.top.titleLabelText = content.text
+ m.top.titleLabelFocusedText = content.text
isProfile = content.isProfile
if isProfile
- m.iconPoster.visible = false
- m.profileIcon.visible = true
+ m.top.iconPosterVisible = false
+ m.top.profileIconVisible = true
else
- m.iconPoster.visible = true
- m.profileIcon.visible = false
- m.iconPoster.uri = content.icon
+ m.top.iconPosterVisible = true
+ m.top.profileIconVisible = false
+ m.top.iconPosterUri = content.icon
end if
OnListHasFocusChange()
@@ -29,15 +22,15 @@ end function
function OnItemHasFocusChange() as void
itemHasFocus = m.top.itemHasFocus
- m.titleLabelFocused.visible = itemHasFocus
- m.titleLabel.visible = not itemHasFocus
+ m.top.titleLabelFocusedVisible = itemHasFocus
+ m.top.titleLabelVisible = not itemHasFocus
end function
function OnListHasFocusChange()
listHasFocus = m.top.listHasFocus
if not listHasFocus
- m.titleLabelFocused.visible = false
- m.titleLabel.visible = false
+ m.top.titleLabelFocusedVisible = false
+ m.top.titleLabelVisible = false
m.top.opacity = 0.8
else
OnItemHasFocusChange()
diff --git a/playlet-lib/src/components/NavBar/NavBarComponent.xml b/playlet-lib/src/components/NavBar/NavBarComponent.xml
index 36e780bd..db8b2d12 100644
--- a/playlet-lib/src/components/NavBar/NavBarComponent.xml
+++ b/playlet-lib/src/components/NavBar/NavBarComponent.xml
@@ -3,6 +3,14 @@
+
+
+
+
+
+
+
+