Fix by allowing RoomPage to access the interactive property of the timeline

This commit is contained in:
James Graham
2024-01-06 16:58:25 +00:00
parent b96d3dde46
commit 8bc4500ce1
4 changed files with 5 additions and 0 deletions

View File

@@ -133,6 +133,7 @@ MessageDelegate {
if (root.mediaInfo.animated) {
imageContainer.imageItem.paused = true
}
root.ListView.view.interactive = false
// We need to make sure the index is that of the MediaMessageFilterModel.
if (root.ListView.view.model instanceof MessageFilterModel) {
RoomManager.maximizeMedia(RoomManager.mediaMessageFilterModel.getRowForSourceItem(root.index))

View File

@@ -286,6 +286,7 @@ Kirigami.Page {
initialIndex: index
})
popup.closed.connect(() => {
timelineViewLoader.item.interactive = true
popup.destroy()
})
popup.open()

View File

@@ -52,6 +52,8 @@ QQC2.ScrollView {
readonly property bool atYEnd: messageListView.atYEnd
property alias interactive: messageListView.interactive
/// Used to determine if scrolling to the bottom should mark the message as unread
property bool hasScrolledUpBefore: false;

View File

@@ -290,6 +290,7 @@ MessageDelegate {
text: i18n("Maximize")
icon.name: "view-fullscreen"
onTriggered: {
root.ListView.view.interactive = false
vid.pause()
// We need to make sure the index is that of the MediaMessageFilterModel.
if (root.ListView.view.model instanceof MessageFilterModel) {