From acb1367f1114f4837d03f4c51937f2b5ac18836a Mon Sep 17 00:00:00 2001 From: miruka Date: Fri, 4 Sep 2020 14:57:09 -0400 Subject: [PATCH] Fix warnings when uploading to non-E2E room Fix these: : media_crypt_dict is undefined. Adding an object with a undefined member does not create a role for it. --- src/backend/matrix_client.py | 2 +- src/gui/PageLoader.qml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/matrix_client.py b/src/backend/matrix_client.py index 788f7e7f..240d1a42 100644 --- a/src/backend/matrix_client.py +++ b/src/backend/matrix_client.py @@ -1426,7 +1426,7 @@ class MatrixClient(nio.AsyncClient): filesize = filesize, ) - return UploadReturn(response.content_uri, mime, decryption_dict) + return UploadReturn(response.content_uri, mime, decryption_dict or {}) async def set_avatar_from_file(self, path: Union[Path, str]) -> None: diff --git a/src/gui/PageLoader.qml b/src/gui/PageLoader.qml index e9681dda..0e002207 100644 --- a/src/gui/PageLoader.qml +++ b/src/gui/PageLoader.qml @@ -35,9 +35,11 @@ HLoader { item[prop] = value recycled() + print("r") } else { pageLoader.setSource(componentUrl, properties) window.uiState.page = componentUrl + print("X") } window.uiState.pageProperties = properties