From bd8c6ec0fc97579801efb3dca96ed3a260b7a4ec Mon Sep 17 00:00:00 2001 From: miruka Date: Tue, 1 Sep 2020 14:06:28 -0400 Subject: [PATCH] Force-reload background image on config reload Make it possible to see the change without restarting Mirage if an image used for the theme's background was edited, or if used did the mistake of typing "/path/to/img" then corrects it to "file:///path/to/img". --- TODO.md | 6 ++---- src/gui/UI.qml | 5 ++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/TODO.md b/TODO.md index 08993e21..7d96db20 100644 --- a/TODO.md +++ b/TODO.md @@ -1,7 +1,8 @@ # TODO +- handle invalid access token +- If an account is gone from the user's config, discard UI state last page - room A-Z sorting -- force reload theme ui background - move uiScale to settings.json - up/down doesn't work in the middle of a @word for which autocompletion isn't open because no matches @@ -54,9 +55,6 @@ - Catch server 5xx errors when sending message and retry -- Handle cases where a known account's access token is invalid -- If an account is gone from the user's config, discard UI state last page - - After forgetting a room, it comes back because of the "you left" event - `code`, mentions and links in quote ("> http://example.com") aren't properly diff --git a/src/gui/UI.qml b/src/gui/UI.qml index a391abb1..c839f2ff 100644 --- a/src/gui/UI.qml +++ b/src/gui/UI.qml @@ -32,7 +32,10 @@ Item { readonly property alias idleManager: idleManager function reloadSettings() { - py.loadSettings(() => { mainUI.pressAnimation.start() }) + py.loadSettings(() => { + image.reload() + mainUI.pressAnimation.start() + }) }