diff --git a/TODO.md b/TODO.md index 5b190cc9..32016d36 100644 --- a/TODO.md +++ b/TODO.md @@ -2,9 +2,7 @@ - Fix right margin of own `\n` messages -- If an account is gone from the user's config, discard UI state last page - filter > enter > room list is always scrolled to top -- ctrl+j/k when scrolled up - session list: prevent tab-focusing the delegates - refresh server list button diff --git a/src/gui/Popups/InvalidAccessTokenPopup.qml b/src/gui/Popups/InvalidAccessTokenPopup.qml index 8ee60d45..1117edb6 100644 --- a/src/gui/Popups/InvalidAccessTokenPopup.qml +++ b/src/gui/Popups/InvalidAccessTokenPopup.qml @@ -9,7 +9,10 @@ HFlickableColumnPopup { property string userId - signal signBackInRequest() + function addAccount() { + window.mainUI.pageLoader.show("Pages/AddAccount/AddAccount.qml") + } + page.footer: AutoDirectionLayout { ApplyButton { @@ -17,8 +20,7 @@ HFlickableColumnPopup { text: qsTr("Sign back in") icon.name: "sign-back-in" onClicked: { - const page = "Pages/AddAccount/AddAccount.qml" - window.mainUI.pageLoader.show(page) + addAccount() popup.close() } } @@ -29,6 +31,8 @@ HFlickableColumnPopup { } } + onClosed: if (window.uiState.pageProperties.userId === userId) addAccount() + SummaryLabel { text: qsTr("Signed out from %1").arg(coloredNameHtml("", userId)) textFormat: SummaryLabel.StyledText