linphone-desktop/linphone-app/ui/modules/Linphone/Chat/OutgoingMessage.qml
Julien Wadel 3031cc856a Fixes and Features : Fullscreen, crashs, contacts, messages
Fixes:

* Change download URL to `https://www.linphone.org/technical-corner/linphone`
* Crash on contacts list when deleting a friend and trying to load logs.
* Message status behaviour : Resuming status when changing logs, cursor shapes updates, bind the `resend message` action to error icon
* Synchronize settings and main presence.
* QML Crashs on fullscreen

Features :

* Add utilities in fullscreen view (media quality, security, mutable speaker)
* Show fullscreen on the current call screen
* Show Display name of participant in conference
* Participants in conference are mutable
2020-05-15 09:00:09 +02:00

102 lines
2.9 KiB
QML

import QtQuick 2.7
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import Common 1.0
import Linphone 1.0
import Linphone.Styles 1.0
import Utils 1.0
// =============================================================================
Item {
implicitHeight: message.height
width: parent.width
Message {
id: message
anchors {
left: parent.left
leftMargin: ChatStyle.entry.metaWidth
right: parent.right
}
backgroundColor: ChatStyle.entry.message.outgoing.backgroundColor
color: ChatStyle.entry.message.outgoing.text.color
pointSize: ChatStyle.entry.message.outgoing.text.pointSize
width: parent.width
Row {
spacing: ChatStyle.entry.message.extraContent.spacing
Component {
id: icon
Icon {
readonly property bool isError: Utils.includes([
ChatModel.MessageStatusFileTransferError,
ChatModel.MessageStatusNotDelivered,
], $chatEntry.status)
readonly property bool isUploaded: $chatEntry.status === ChatModel.MessageStatusDelivered
readonly property bool isDelivered: $chatEntry.status === ChatModel.MessageStatusDeliveredToUser
readonly property bool isRead: $chatEntry.status === ChatModel.MessageStatusDisplayed
icon: isError
? 'chat_error'
: (isRead ? 'chat_read' : (isDelivered ? 'chat_delivered' : ''))
iconSize: ChatStyle.entry.message.outgoing.sendIconSize
MouseArea {
anchors.fill: parent
cursorShape: containsMouse
? Qt.PointingHandCursor
: Qt.ArrowCursor
hoverEnabled: true
visible: icon.isError || $chatEntry.status === ChatModel.MessageStatusIdle
onClicked: proxyModel.resendMessage(index)
}
TooltipArea {
text: isError
? qsTr('messageError')
: (isRead ? qsTr('messageRead') : qsTr('messageDelivered'))
}
}
}
Component {
id: indicator
Item {
anchors.fill: parent
BusyIndicator {
anchors.centerIn: parent
height: ChatStyle.entry.message.outgoing.busyIndicatorSize
width: ChatStyle.entry.message.outgoing.busyIndicatorSize
}
}
}
Loader {
height: ChatStyle.entry.lineHeight
width: ChatStyle.entry.message.outgoing.areaSize
sourceComponent: $chatEntry.status === ChatModel.MessageStatusInProgress || $chatEntry.status === ChatModel.MessageStatusFileTransferInProgress
? indicator
: icon
}
ActionButton {
height: ChatStyle.entry.lineHeight
icon: 'delete'
iconSize: ChatStyle.entry.deleteIconSize
visible: isHoverEntry()
onClicked: removeEntry()
}
}
}
}