From 175d7a195c32bd3c2c60ab55e69d576b53d47131 Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Fri, 11 Jun 2021 12:22:47 +0200 Subject: [PATCH] fix(StatusAppNavBar): don't rely on `undefined` property This turned out to be a bug. `model.count` isn't defined on `Repeater` types. Also, set `ScrollView` height to `0` if there are not community tab buttons. This is needed because the columns implicit height comes with spacing, resulting in some height. --- src/StatusQ/Layout/StatusAppNavBar.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/StatusQ/Layout/StatusAppNavBar.qml b/src/StatusQ/Layout/StatusAppNavBar.qml index eb5ede4c..393ece0e 100644 --- a/src/StatusQ/Layout/StatusAppNavBar.qml +++ b/src/StatusQ/Layout/StatusAppNavBar.qml @@ -79,7 +79,7 @@ Rectangle { bottomPadding = 16 topPadding = 16 } else { - height = navBarCommunityTabButtonsSlot.implicitHeight + height = navBarCommunityTabButtons.count > 0 ? navBarCommunityTabButtonsSlot.implicitHeight : 0 } } @@ -107,7 +107,7 @@ Rectangle { height: 1 width: 30 color: Theme.palette.directColor7 - anchors.top: navBarCommunityTabButtons.model && navBarCommunityTabButtons.model.count > 0 ? navBarScrollSection.bottom : navBarChatButtonSlot.bottom + anchors.top: !!navBarCommunityTabButtons.model && navBarCommunityTabButtons.count > 0 ? navBarScrollSection.bottom : navBarChatButtonSlot.bottom anchors.topMargin: navBarScrollSection.height < navBarCommunityTabButtonsSlot.implicitHeight ? 0 : 16 anchors.horizontalCenter: parent.horizontalCenter visible: navBarChatButton !== null && navBarTabButtons.length > 0