Minor improvements
- Rename TextDelegate to RichLabel since it's not actually a delegate - Allow web search for whole messages
This commit is contained in:
@@ -19,9 +19,18 @@ TimelineContainer {
|
||||
onReplyClicked: ListView.view.goToEvent(eventID)
|
||||
hoverComponent: hoverActions
|
||||
|
||||
innerObject: TextDelegate {
|
||||
innerObject: RichLabel {
|
||||
isEmote: messageDelegate.isEmote
|
||||
Layout.maximumWidth: messageDelegate.bubbleMaxWidth
|
||||
onRequestOpenMessageContext: openMessageContext(model, parent.selectedText)
|
||||
|
||||
TapHandler {
|
||||
acceptedButtons: Qt.RightButton
|
||||
onTapped: openMessageContext(model, parent.selectedText)
|
||||
}
|
||||
|
||||
TapHandler {
|
||||
acceptedButtons: Qt.LeftButton
|
||||
onLongPressed: openMessageContext(model, parent.selectedText)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,11 +75,10 @@ MouseArea {
|
||||
|
||||
Component {
|
||||
id: textComponent
|
||||
TextDelegate {
|
||||
RichLabel {
|
||||
id: replyText
|
||||
textMessage: reply.display
|
||||
textFormat: Text.RichText
|
||||
hasContextMenu: false
|
||||
width: Math.min(implicitWidth, bubbleMaxWidth - Kirigami.Units.largeSpacing * 3)
|
||||
x: Kirigami.Units.smallSpacing * 3 + replyAvatar.width
|
||||
}
|
||||
|
||||
@@ -18,10 +18,6 @@ TextEdit {
|
||||
property string textMessage: model.display
|
||||
property bool spoilerRevealed: !hasSpoiler.test(textMessage)
|
||||
|
||||
property bool hasContextMenu: true
|
||||
|
||||
signal requestOpenMessageContext()
|
||||
|
||||
ListView.onReused: Qt.binding(() => !hasSpoiler.test(textMessage))
|
||||
|
||||
Layout.fillWidth: Config.compactLayout
|
||||
@@ -77,16 +73,4 @@ a{
|
||||
enabled: !parent.hoveredLink && !spoilerRevealed
|
||||
onTapped: spoilerRevealed = true
|
||||
}
|
||||
|
||||
TapHandler {
|
||||
acceptedButtons: Qt.RightButton
|
||||
onTapped: openMessageContext(model, parent.selectedText)
|
||||
enabled: hasContextMenu
|
||||
}
|
||||
|
||||
TapHandler {
|
||||
acceptedButtons: Qt.LeftButton
|
||||
onLongPressed: requestOpenMessageContext()
|
||||
enabled: hasContextMenu
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
module NeoChat.Component.Timeline
|
||||
RichLabel 1.0 RichLabel.qml
|
||||
TimelineContainer 1.0 TimelineContainer.qml
|
||||
TextDelegate 1.0 TextDelegate.qml
|
||||
StateDelegate 1.0 StateDelegate.qml
|
||||
SectionDelegate 1.0 SectionDelegate.qml
|
||||
ImageDelegate 1.0 ImageDelegate.qml
|
||||
|
||||
Reference in New Issue
Block a user