Eliminate room delegate subtitile binding loop

This commit is contained in:
miruka 2019-07-04 19:21:07 -04:00
parent 634796b7d9
commit 5812dcb051

View File

@ -50,10 +50,13 @@ MouseArea {
) + ": " + py.callSync("inlinify", [ev.content])
}
// Have to do it like this to avoid binding loop
property var lastEv: timelines.lastEventOf(model.roomId)
onLastEvChanged: text = getText(lastEv)
id: subtitleLabel
visible: Boolean(text)
textFormat: Text.StyledText
text: getText(timelines.lastEventOf(model.roomId))
font.pixelSize: HStyle.fontSize.small
elide: Text.ElideRight