Show login page if current was for logged out acc.

This commit is contained in:
miruka 2020-09-04 14:05:07 -04:00
parent 8376d85961
commit 89f8cf25d3
2 changed files with 7 additions and 5 deletions

View File

@ -2,9 +2,7 @@
- Fix right margin of own `<image url>\n<image url>` messages - Fix right margin of own `<image url>\n<image url>` 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 - filter > enter > room list is always scrolled to top
- ctrl+j/k when scrolled up
- session list: prevent tab-focusing the delegates - session list: prevent tab-focusing the delegates
- refresh server list button - refresh server list button

View File

@ -9,7 +9,10 @@ HFlickableColumnPopup {
property string userId property string userId
signal signBackInRequest() function addAccount() {
window.mainUI.pageLoader.show("Pages/AddAccount/AddAccount.qml")
}
page.footer: AutoDirectionLayout { page.footer: AutoDirectionLayout {
ApplyButton { ApplyButton {
@ -17,8 +20,7 @@ HFlickableColumnPopup {
text: qsTr("Sign back in") text: qsTr("Sign back in")
icon.name: "sign-back-in" icon.name: "sign-back-in"
onClicked: { onClicked: {
const page = "Pages/AddAccount/AddAccount.qml" addAccount()
window.mainUI.pageLoader.show(page)
popup.close() popup.close()
} }
} }
@ -29,6 +31,8 @@ HFlickableColumnPopup {
} }
} }
onClosed: if (window.uiState.pageProperties.userId === userId) addAccount()
SummaryLabel { SummaryLabel {
text: qsTr("Signed out from %1").arg(coloredNameHtml("", userId)) text: qsTr("Signed out from %1").arg(coloredNameHtml("", userId))
textFormat: SummaryLabel.StyledText textFormat: SummaryLabel.StyledText