Simplify status message in profile a bit
This commit is contained in:
parent
5301f98d4a
commit
5d7deca0db
@ -179,22 +179,19 @@ ApplicationWindow {
|
|||||||
|
|
||||||
MatrixText {
|
MatrixText {
|
||||||
id: statusMsg
|
id: statusMsg
|
||||||
text: updateStatus()
|
text: qsTr("<i><b>Status:</b> %1</i>").arg(userStatus)
|
||||||
visible: Presence.userStatus(profile.userid) != ""
|
visible: userStatus != ""
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
horizontalAlignment: TextEdit.AlignHCenter
|
horizontalAlignment: TextEdit.AlignHCenter
|
||||||
Layout.leftMargin: Nheko.paddingMedium
|
Layout.leftMargin: Nheko.paddingMedium
|
||||||
Layout.rightMargin: Nheko.paddingMedium
|
Layout.rightMargin: Nheko.paddingMedium
|
||||||
font.pointSize: Math.floor(fontMetrics.font.pointSize * 0.9)
|
font.pointSize: Math.floor(fontMetrics.font.pointSize * 0.9)
|
||||||
|
|
||||||
function updateStatus(){
|
property string userStatus: Presence.userStatus(profile.userid)
|
||||||
return qsTr("<i><b>Status:</b> %1</i>").arg(Presence.userStatus(profile.userid))
|
|
||||||
}
|
|
||||||
Connections {
|
Connections {
|
||||||
target: Presence
|
target: Presence
|
||||||
function onPresenceChanged(id) {
|
function onPresenceChanged(id) {
|
||||||
if (id == profile.userid) statusMsg.text = statusMsg.updateStatus();
|
if (id == profile.userid) statusMsg.userStatus = Presence.userStatus(profile.userid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user