19import QtQuick.Controls.Suru 2.2
21import Lomiri.Components 1.3
22import Dekko.Components 1.0
23import Dekko.Mail.API 1.0
24import Dekko.Mail.Stores.Mail 1.0
25import "./private/UiUtils.js" as UiUtils
26import Dekko.Lomiri.Constants 1.0
34 front: PixelPerfectItem {
38 id: component_inner_av
42 anchors.centerIn: parent
43 aspect: LomiriShape.Flat
44 backgroundColor: msg ? UiUtils.getIconColor(msg.from.name) : "transparent"
45 opacity: ma.containsMouse ? 0.8 : 1.0
49 color: Suru.backgroundColor
50 text: msg ? msg.from.initials :
""
51 anchors.centerIn: parent
57 anchors.centerIn: parent
58 height: parent.height -
Style.defaultSpacing
60 color: Suru.backgroundColor
61 visible: !initialsLabel.text
68 active: !inner_name.visible
69 sourceComponent: component_inner_av
73 emailAddress: msg ? msg.from.address :
""
76 visible: status === Image.Ready
77 opacity: ma.containsMouse ? 0.8 : 1.0
84 visible: flipable.state ===
"front"
85 onClicked: flipable.clicked()
95 avatarSearchOverlay.visible =
true
100 avatarSearchOverlay.visible =
false
106 id: avatarSearchOverlay
108 anchors.centerIn: parent
109 aspect: LomiriShape.Flat
110 backgroundColor: Suru.secondaryForegroundColor
114 width: parent.width -
Style.defaultSpacing
116 anchors.centerIn: parent
117 name: Icons.SearchIcon
118 color: Suru.backgroundColor
123 back: PixelPerfectItem {
125 ListItemWithActionsCheckBox {
126 anchors.centerIn: parent
127 checked: msg && msg.checked
134 visible: flipable.state ===
"back"
138 MessageActions.setMessageCheck(model.index, Qt.Unchecked)
140 MessageActions.setMessageCheck(model.index, Qt.Checked)
146 transform: Rotation {
148 origin.x: flipable.width/2
149 origin.y: flipable.height/2
150 axis.x: 0; axis.y: 1; axis.z: 0
153 state: MailStore.isInSelectionMode ?
"back" :
"front"
158 PropertyChanges { target: rotation; angle: 0 }
163 PropertyChanges { target: rotation; angle: 180 }
167 transitions: Transition {
168 SequentialAnimation {
172 if (model.index > listView.selectionIndex) {
173 result = model.index - listView.selectionIndex
174 }
else if ( model.index < listView.selectionIndex) {
175 result = listView.selectionIndex - model.index
177 if (result > 0 && result <= 20) {
184 NumberAnimation { target: rotation; property:
"angle"; duration: LomiriAnimation.FastDuration }