diff --git a/TODO.md b/TODO.md index 9e474ba5..2a22b2cf 100644 --- a/TODO.md +++ b/TODO.md @@ -1,6 +1,5 @@ # TODO -- strip file:// from copy path - some way to show name and date on EventFile - sentinel func to report path if already cached without having to click - verify eventfile height diff --git a/src/qml/Chat/Timeline/EventFile.qml b/src/qml/Chat/Timeline/EventFile.qml index 605741d6..54c69c03 100644 --- a/src/qml/Chat/Timeline/EventFile.qml +++ b/src/qml/Chat/Timeline/EventFile.qml @@ -30,7 +30,7 @@ HTile { eventDelegate.hoveredMediaTypeUrl = [ EventDelegate.Media.File, - loader.downloadedPath || loader.mediaUrl + loader.downloadedPath.replace(/^file:\/\//, "") || loader.mediaUrl ] } diff --git a/src/qml/Chat/Timeline/EventImage.qml b/src/qml/Chat/Timeline/EventImage.qml index 74034011..6e9204f4 100644 --- a/src/qml/Chat/Timeline/EventImage.qml +++ b/src/qml/Chat/Timeline/EventImage.qml @@ -90,7 +90,8 @@ HMxcImage { eventDelegate.hoveredMediaTypeUrl = [ EventDelegate.Media.Image, - loader.downloadedPath || loader.mediaUrl + loader.downloadedPath.replace(/^file:\/\//, "") || + loader.mediaUrl ] } } diff --git a/src/qml/Chat/Timeline/EventMediaLoader.qml b/src/qml/Chat/Timeline/EventMediaLoader.qml index 6e83cc31..b66df087 100644 --- a/src/qml/Chat/Timeline/EventMediaLoader.qml +++ b/src/qml/Chat/Timeline/EventMediaLoader.qml @@ -74,6 +74,7 @@ HLoader { if (! loader.mediaUrl.startsWith("mxc://")) { downloadedPath = loader.mediaUrl callback(loader.mediaUrl) + return } if (! downloadedPath) print("Downloading " + loader.mediaUrl + " ...")