diff --git a/gui/ChatBlockDelegate.qml b/gui/ChatBlockDelegate.qml index bee6f2e..f7daf84 100644 --- a/gui/ChatBlockDelegate.qml +++ b/gui/ChatBlockDelegate.qml @@ -13,7 +13,7 @@ ColumnLayout { required property var blockSegments // Reference to parent ListView for scroll control - property var chatView: null + property ListView parentListView: null // Expand state based on block type property bool blockExpanded: { @@ -150,9 +150,9 @@ ColumnLayout { selectedTextColor: theme.highlightedTextColor onActiveFocusChanged: { - if (!activeFocus && root.chatView) - root.chatView.interactive = true - } + if (!activeFocus && root.parentListView) + root.parentListView.interactive = true + } Menu { id: contextMenu @@ -173,11 +173,11 @@ ColumnLayout { propagateComposedEvents: true cursorShape: Qt.IBeamCursor onPressed: function(mouse) { - if (root.chatView) root.chatView.interactive = false + if (root.parentListView) root.parentListView.interactive = false mouse.accepted = false } onReleased: function(mouse) { - if (root.chatView) root.chatView.interactive = true + if (root.parentListView) root.parentListView.interactive = true mouse.accepted = false } } @@ -279,11 +279,11 @@ ColumnLayout { propagateComposedEvents: true cursorShape: Qt.IBeamCursor onPressed: function(mouse) { - if (root.chatView) root.chatView.interactive = false + if (root.parentListView) root.parentListView.interactive = false mouse.accepted = false } onReleased: function(mouse) { - if (root.chatView) root.chatView.interactive = true + if (root.parentListView) root.parentListView.interactive = true mouse.accepted = false } } diff --git a/gui/main.qml b/gui/main.qml index 6e275c9..3de2677 100644 --- a/gui/main.qml +++ b/gui/main.qml @@ -929,7 +929,7 @@ ApplicationWindow { delegate: ChatBlockDelegate { width: chatView.width - 8 - chatView: chatView + parentListView: chatView } }