Commit 1c44c904 authored by Karel Slaný's avatar Karel Slaný
Browse files

Merge branch 'sent-msg-model' into 'develop'

Removed number of unread sent messages from account page

See merge request !67
parents d0c01b8f 2d3d5197
......@@ -38,7 +38,7 @@ ListView {
id: messageItem
height: listItemHeight
width: parent.width
color: (rReadLocally) ? readBgColor : datovkaPalette.base
color: (rMsgType == MessageType.TYPE_RECEIVED && !rReadLocally) ? datovkaPalette.base : readBgColor
Item {
id: msgEnvelope
anchors.fill: parent
......@@ -58,7 +58,7 @@ ListView {
id: r1c1p
anchors.centerIn: parent
sourceSize.height: parent.height * 0.8
source: (rReadLocally) ? "qrc:/ui/email-open-outline.svg" : "qrc:/ui/email-outline.svg"
source: (rMsgType == MessageType.TYPE_RECEIVED && !rReadLocally) ? "qrc:/ui/email-outline.svg" : "qrc:/ui/email-open-outline.svg"
}
ColorOverlay {
anchors.fill: r1c1p
......@@ -69,8 +69,8 @@ ListView {
Text {
id: r1c2
text: (rMsgType == MessageType.TYPE_RECEIVED) ? rFrom : rTo
color: (rReadLocally) ? datovkaPalette.windowText : headerColor
font.bold: !rReadLocally
color: (rMsgType == MessageType.TYPE_RECEIVED && !rReadLocally) ? headerColor : datovkaPalette.windowText
font.bold: (rMsgType == MessageType.TYPE_RECEIVED && !rReadLocally)
}
Item {
id: r2c1
......@@ -92,7 +92,7 @@ ListView {
id: r2c2
text: rAnnotation
color: datovkaPalette.windowText
font.bold: !rReadLocally
font.bold: (rMsgType == MessageType.TYPE_RECEIVED && !rReadLocally)
}
Image {
id: r3c1
......
......@@ -377,7 +377,7 @@ Component {
anchors.left: msgSentImage.right
anchors.leftMargin: defaultMargin
color: datovkaPalette.text
text: qsTr("Sent messages") + " [" + rSntUnread + "/" + rSntTotal + "]"
text: qsTr("Sent messages") + " [" + rSntTotal + "]"
font.bold: true
}
Rectangle {
......
......@@ -57,6 +57,11 @@ Component {
}
proxyMessageModel.setSourceModel(messageModel)
/* Don't use message settings for sent messages */
if (msgType == MessageType.TYPE_SENT) {
settingsButton.enabled = false
}
}
MessageListModel {
......@@ -197,17 +202,20 @@ Component {
}
onMsgPressAndHold: {
statusBar.visible = false
pageView.push(pageMenuMessage, {
"pageView": pageView,
"statusBar": statusBar,
"acntName": acntName,
"userName": userName,
"msgType": msgType,
"msgId": msgId,
"canDeleteMsg": canDelete,
"accountModel": accountModel,
"messageModel": messageModel
}, StackView.Immediate)
/* Use message settings for received message only */
if (msgType == MessageType.TYPE_RECEIVED) {
pageView.push(pageMenuMessage, {
"pageView": pageView,
"statusBar": statusBar,
"acntName": acntName,
"userName": userName,
"msgType": msgType,
"msgId": msgId,
"canDeleteMsg": canDelete,
"accountModel": accountModel,
"messageModel": messageModel
}, StackView.Immediate)
}
}
property bool downloadStart: false
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment