Rework ActionsHandler
Rework ActionsHandler as static helper functions. The functions are now invoked from ChatBarCache so there is no need to pass an actions handler object around qml simplifying the code.
This commit is contained in:
@@ -43,14 +43,6 @@ QQC2.ScrollView {
|
||||
*/
|
||||
required property MessageFilterModel messageFilterModel
|
||||
|
||||
/**
|
||||
* @brief The ActionsHandler object to use.
|
||||
*
|
||||
* This is expected to have the correct room set otherwise messages will be sent
|
||||
* to the wrong room.
|
||||
*/
|
||||
required property ActionsHandler actionsHandler
|
||||
|
||||
readonly property bool atYEnd: messageListView.atYEnd
|
||||
|
||||
property alias interactive: messageListView.interactive
|
||||
@@ -64,8 +56,6 @@ QQC2.ScrollView {
|
||||
|
||||
ListView {
|
||||
id: messageListView
|
||||
// So that delegates can access the actionsHandler properly.
|
||||
readonly property ActionsHandler actionsHandler: root.actionsHandler
|
||||
|
||||
readonly property int largestVisibleIndex: count > 0 ? indexAt(contentX + (width / 2), contentY + height - 1) : -1
|
||||
readonly property var sectionBannerItem: contentHeight >= height ? itemAtIndex(sectionBannerIndex()) : undefined
|
||||
|
||||
Reference in New Issue
Block a user