diff --git a/TODO.md b/TODO.md index 964ba087..02dcbcb7 100644 --- a/TODO.md +++ b/TODO.md @@ -1,8 +1,9 @@ - Media - - Verify things work with chat.privacytools.io (subdomain weirdness) + - Upload progression and pausing - Confirmation box after picking file to upload - - Handle upload/set avatar errors: bad path, is a dir, file too big, etc - - Show real progression for mxc thumbnail loadings, uploads and downloads + - Handle set avatar upload errors + - Show real progression for mxc thumbnail loadings + - Support encrypted m.file - Show reason under broken thumbnail icons - Support m.file thumbnails diff --git a/src/python/backend.py b/src/python/backend.py index df105e41..27e98d02 100644 --- a/src/python/backend.py +++ b/src/python/backend.py @@ -136,11 +136,6 @@ class Backend: return hsluv.hsluv_to_rgb([hue, saturation, lightness]) - @staticmethod - async def mxc_to_http(mxc: str) -> Optional[str]: - return nio.Api.mxc_to_http(mxc) - - async def load_settings(self) -> tuple: from .config_files import Theme settings = await self.ui_settings.read() diff --git a/src/python/media_cache.py b/src/python/media_cache.py index b05c75f3..69730290 100644 --- a/src/python/media_cache.py +++ b/src/python/media_cache.py @@ -40,11 +40,6 @@ class Media: raise ValueError(f"Invalid mxc URI: {self.mxc}") - @property - def http(self) -> str: - return nio.Api.mxc_to_http(self.mxc) - - @property def local_path(self) -> Path: parsed = urlparse(self.mxc) diff --git a/src/qml/Chat/Timeline/EventImage.qml b/src/qml/Chat/Timeline/EventImage.qml index 632340df..53cd4131 100644 --- a/src/qml/Chat/Timeline/EventImage.qml +++ b/src/qml/Chat/Timeline/EventImage.qml @@ -57,7 +57,8 @@ HMxcImage { let isMxc = toOpen.startsWith("mxc://") isMxc ? - py.callCoro("mxc_to_http", [toOpen], callback) : callback(toOpen) + py.callClientCoro(chatPage.userId, "mxc_to_http", [toOpen], callback) : + callback(toOpen) }