Media Model

Create a media model for all the media message in the timeline and then setup `NeoChatMaximizeComponent` so that it can use the media model to scroll through all loaded images and video in the current room.

Depends upon libraries/kirigami-addons!105

FEATURE: 467411
This commit is contained in:
James Graham
2023-07-08 11:07:04 +00:00
committed by Tobias Fella
parent 81928d8b93
commit c55b40c9c6
11 changed files with 219 additions and 90 deletions

View File

@@ -147,32 +147,10 @@ TimelineContainer {
img.QQC2.ToolTip.hide()
img.paused = true
root.ListView.view.interactive = false
var popup = maximizeImageComponent.createObject(QQC2.ApplicationWindow.overlay, {
eventId: root.eventId,
time: root.time,
author: root.author,
delegateType: root.delegateType,
plainText: root.plainText,
caption: root.display,
mediaInfo: root.mediaInfo,
progressInfo: root.progressInfo,
mimeType: root.mimeType,
source: root.source
})
popup.closed.connect(() => {
root.ListView.view.interactive = true
img.paused = false
popup.destroy()
})
popup.open()
root.ListView.view.showMaximizedMedia(root.index)
}
}
Component {
id: maximizeImageComponent
NeochatMaximizeComponent {}
}
function downloadAndOpen() {
if (downloaded) {
openSavedFile()