Fix room subtitle reloading

Replace the "reloadThis" ListModel hack by an actual signal,
works when the subtitle is displayed in more than one place
(e.g. two accounts in the same room connected).
This commit is contained in:
miruka
2019-04-14 14:32:51 -04:00
parent 5a180120b1
commit 3ec51b9253
2 changed files with 20 additions and 16 deletions

View File

@@ -39,10 +39,18 @@ MouseArea {
rightPadding: leftPadding
}
Base.HLabel {
function get_text() {
return SidePaneJS.get_last_room_event_text(room_id)
}
Connections {
target: Backend.models.roomEvents.get(room_id)
onChanged: subtitleLabel.text = subtitleLabel.get_text()
}
id: subtitleLabel
visible: text !== ""
text: Backend.models.roomEvents.get(room_id).reloadThis,
SidePaneJS.get_last_room_event_text(room_id)
text: get_text()
textFormat: Text.StyledText
font.pixelSize: smallSize