mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-22 04:21:44 +00:00
parent
663fac9fa7
commit
22ee49c551
@ -132,7 +132,7 @@ QtObject:
|
||||
|
||||
proc setEditModeOnAndScrollToLastMessage*(self: View, pubkey: string) {.slot.} =
|
||||
let lastMessage = self.model.getLastItemFrom(pubKey)
|
||||
if lastMessage != nil and lastMessage.id != "" and lastMessage.contentType != ContentType.Image:
|
||||
if lastMessage != nil and lastMessage.id != "":
|
||||
self.model.setEditModeOn(lastMessage.id)
|
||||
self.jumpToMessage(lastMessage.id)
|
||||
|
||||
|
@ -318,31 +318,32 @@ Control {
|
||||
spacing: 9
|
||||
Repeater {
|
||||
model: root.messageDetails.albumCount
|
||||
Loader {
|
||||
|
||||
delegate: Loader {
|
||||
active: true
|
||||
property bool imageLoaded: index < root.messageDetails.album.length
|
||||
property string imagePath: imageLoaded ? root.messageDetails.album[index] : ""
|
||||
readonly property bool imageLoaded: index < root.messageDetails.album.length
|
||||
readonly property string imagePath: imageLoaded ? root.messageDetails.album[index] : ""
|
||||
sourceComponent: imageLoaded ? imageComponent : imagePlaceholderComponent
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: imageComponent
|
||||
StatusImageMessage {
|
||||
Component {
|
||||
id: imageComponent
|
||||
StatusImageMessage {
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
imageWidth: Math.min(parent.width / root.messageDetails.albumCount - 9 * (root.messageDetails.albumCount - 1), 144)
|
||||
source: root.messageDetails.album[index]
|
||||
imageWidth: Math.min(messageLayout.width / root.messageDetails.albumCount - 9 * (root.messageDetails.albumCount - 1), 144)
|
||||
source: imagePath
|
||||
onClicked: root.imageClicked(image, mouse, imageSource)
|
||||
shapeType: root.messageDetails.amISender ? StatusImageMessage.ShapeType.RIGHT_ROUNDED : StatusImageMessage.ShapeType.LEFT_ROUNDED
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: imagePlaceholderComponent
|
||||
LoadingComponent {
|
||||
radius: 4
|
||||
height: 194
|
||||
width: 144
|
||||
}
|
||||
Component {
|
||||
id: imagePlaceholderComponent
|
||||
LoadingComponent {
|
||||
radius: 4
|
||||
height: 194
|
||||
width: 144
|
||||
}
|
||||
}
|
||||
|
||||
|
2
vendor/status-go
vendored
2
vendor/status-go
vendored
@ -1 +1 @@
|
||||
Subproject commit 96532f97c460f849ed8b1ed5d2507593e3ca5c1c
|
||||
Subproject commit 2950d37e430844d83d9897084b51a028d56e8052
|
Loading…
x
Reference in New Issue
Block a user