mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Fix a few null warnings
This commit is contained in:
parent
fc7df50d9a
commit
ded926cdf9
3 changed files with 9 additions and 11 deletions
|
@ -33,7 +33,7 @@ ScrollView {
|
||||||
verticalLayoutDirection: ListView.BottomToTop
|
verticalLayoutDirection: ListView.BottomToTop
|
||||||
onCountChanged: {
|
onCountChanged: {
|
||||||
// Mark timeline as read
|
// Mark timeline as read
|
||||||
if (atYEnd)
|
if (atYEnd && room)
|
||||||
model.currentIndex = 0;
|
model.currentIndex = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -233,8 +233,8 @@ ScrollView {
|
||||||
id: dateBubble
|
id: dateBubble
|
||||||
|
|
||||||
anchors.horizontalCenter: parent ? parent.horizontalCenter : undefined
|
anchors.horizontalCenter: parent ? parent.horizontalCenter : undefined
|
||||||
visible: previousMessageDay !== day
|
visible: room && previousMessageDay !== day
|
||||||
text: chat.model.formatDateSeparator(timestamp)
|
text: room ? room.formatDateSeparator(timestamp) : ""
|
||||||
color: Nheko.colors.text
|
color: Nheko.colors.text
|
||||||
height: Math.round(fontMetrics.height * 1.4)
|
height: Math.round(fontMetrics.height * 1.4)
|
||||||
width: contentWidth * 1.2
|
width: contentWidth * 1.2
|
||||||
|
@ -257,10 +257,10 @@ ScrollView {
|
||||||
|
|
||||||
width: Nheko.avatarSize
|
width: Nheko.avatarSize
|
||||||
height: Nheko.avatarSize
|
height: Nheko.avatarSize
|
||||||
url: chat.model.avatarUrl(userId).replace("mxc://", "image://MxcImage/")
|
url: !room ? "" : room.avatarUrl(userId).replace("mxc://", "image://MxcImage/")
|
||||||
displayName: userName
|
displayName: userName
|
||||||
userid: userId
|
userid: userId
|
||||||
onClicked: chat.model.openUserProfile(userId)
|
onClicked: room.openUserProfile(userId)
|
||||||
ToolTip.visible: avatarHover.hovered
|
ToolTip.visible: avatarHover.hovered
|
||||||
ToolTip.text: userid
|
ToolTip.text: userid
|
||||||
|
|
||||||
|
|
|
@ -84,11 +84,10 @@ Item {
|
||||||
target: timelineView
|
target: timelineView
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MessageView {
|
||||||
MessageView {
|
implicitHeight: msgView.height - typingIndicator.height
|
||||||
implicitHeight: msgView.height - typingIndicator.height
|
Layout.fillWidth: true
|
||||||
Layout.fillWidth: true
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
source: CallManager.isOnCall && CallManager.callType != CallType.VOICE ? "voip/VideoCall.qml" : ""
|
source: CallManager.isOnCall && CallManager.callType != CallType.VOICE ? "voip/VideoCall.qml" : ""
|
||||||
|
|
|
@ -279,7 +279,6 @@ ApplicationWindow {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
Loading…
Reference in a new issue