Fix binding loops.

This commit is contained in:
armored-dragon 2025-01-15 13:53:16 -06:00
parent 6c631bf361
commit f59f39ecb4
No known key found for this signature in database
GPG key ID: C7207ACC3382AD8B

View file

@ -20,26 +20,23 @@ Component {
height: 22 height: 22
TextEdit { TextEdit {
text: delegateUsername text: delegateUsername;
color: "lightgray" color: "lightgray";
readOnly: true readOnly: true;
selectByMouse: true selectByMouse: true;
selectByKeyboard: true selectByKeyboard: true;
} }
TextEdit { Text {
anchors.right: parent.right anchors.right: parent.right;
text: delegateDate text: delegateDate;
color: "lightgray" color: "lightgray";
readOnly: true
selectByMouse: true
selectByKeyboard: true
} }
} }
Flow { Flow {
anchors.top: parent.children[0].bottom; anchors.top: parent.children[0].bottom;
width: parent.width * 0.8 width: parent.width;
x: 5 x: 5
id: messageBoxFlow id: messageBoxFlow
@ -47,11 +44,13 @@ Component {
model: delegateText; model: delegateText;
RowLayout { RowLayout {
width: parent.width;
TextEdit { TextEdit {
text: model.value || "" text: model.value || ""
font.pointSize: 12 font.pointSize: 12
wrapMode: Text.Wrap wrapMode: Text.Wrap
width: model.type === 'text' || model.type === 'mention' ? Math.min(messageBoxFlow.width, contentWidth) : 0; width: messageBoxFlow.width;
visible: model.type === 'text' || model.type === 'mention'; visible: model.type === 'text' || model.type === 'mention';
readOnly: true readOnly: true
selectByMouse: true selectByMouse: true
@ -68,10 +67,11 @@ Component {
} }
RowLayout { RowLayout {
width: children[0].contentWidth; width: urlTypeTextDisplay.width;
visible: model.type === 'url'; visible: model.type === 'url';
TextEdit { TextEdit {
id: urlTypeTextDisplay;
text: model.value || ""; text: model.value || "";
font.pointSize: 12; font.pointSize: 12;
wrapMode: Text.Wrap; wrapMode: Text.Wrap;
@ -154,8 +154,8 @@ Component {
} }
Item { Item {
Layout.fillWidth: true Layout.fillWidth: true;
visible: model.type === 'messageEnd' visible: model.type === 'messageEnd';
} }
Item { Item {