Thread fetch more button
Changes threads so there is a button to fetch more events. Also adds a separator between the thread root and the rest of the events.
This commit is contained in:
@@ -2,8 +2,11 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Qt.labs.qmlmodels
|
||||
|
||||
import org.kde.kirigami as Kirigami
|
||||
|
||||
import org.kde.neochat
|
||||
|
||||
/**
|
||||
@@ -54,6 +57,11 @@ DelegateChooser {
|
||||
|
||||
signal removeLinkPreview(int index)
|
||||
|
||||
/**
|
||||
* @brief Request more events in the thread be loaded.
|
||||
*/
|
||||
signal fetchMoreEvents()
|
||||
|
||||
role: "componentType"
|
||||
|
||||
DelegateChoice {
|
||||
@@ -218,6 +226,14 @@ DelegateChooser {
|
||||
}
|
||||
}
|
||||
|
||||
DelegateChoice {
|
||||
roleValue: MessageComponentType.FetchButton
|
||||
delegate: FetchButtonComponent {
|
||||
maxContentWidth: root.maxContentWidth
|
||||
onFetchMoreEvents: root.fetchMoreEvents()
|
||||
}
|
||||
}
|
||||
|
||||
DelegateChoice {
|
||||
roleValue: MessageComponentType.Verification
|
||||
delegate: MimeComponent {
|
||||
@@ -233,6 +249,14 @@ DelegateChooser {
|
||||
}
|
||||
}
|
||||
|
||||
DelegateChoice {
|
||||
roleValue: MessageComponentType.Separator
|
||||
delegate: Kirigami.Separator {
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: root.maxContentWidth
|
||||
}
|
||||
}
|
||||
|
||||
DelegateChoice {
|
||||
roleValue: MessageComponentType.Other
|
||||
delegate: Item {}
|
||||
|
||||
Reference in New Issue
Block a user