Fixes for logging out the active connection
- Don't crash - Fall back to WelcomePage
This commit is contained in:
committed by
Tobias Fella
parent
6c57c41993
commit
e8ad4a5dee
@@ -267,6 +267,17 @@ Kirigami.ApplicationWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: root.connection
|
||||||
|
function onLoggedOut(): void {
|
||||||
|
root.pageStack.clear();
|
||||||
|
let page = root.pageStack.push(Qt.createComponent('org.kde.neochat.login', 'WelcomePage'), {
|
||||||
|
showExisting: true,
|
||||||
|
}) as WelcomePage;
|
||||||
|
page.connectionChosen.connect(() => root.load())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: AccountRegistry
|
target: AccountRegistry
|
||||||
function onRowsRemoved() {
|
function onRowsRemoved() {
|
||||||
|
|||||||
@@ -478,9 +478,8 @@ void RoomManager::setConnection(NeoChatConnection *connection)
|
|||||||
|
|
||||||
m_connection = connection;
|
m_connection = connection;
|
||||||
|
|
||||||
m_lastRoomConfig = m_config->group(m_connection->userId()).group(u"LastOpenRoom"_s);
|
|
||||||
|
|
||||||
if (m_connection != nullptr) {
|
if (m_connection != nullptr) {
|
||||||
|
m_lastRoomConfig = m_config->group(m_connection->userId()).group(u"LastOpenRoom"_s);
|
||||||
connect(m_connection, &NeoChatConnection::showMessage, this, &RoomManager::showMessage);
|
connect(m_connection, &NeoChatConnection::showMessage, this, &RoomManager::showMessage);
|
||||||
connect(m_connection, &NeoChatConnection::createdRoom, this, [this](Quotient::Room *room) {
|
connect(m_connection, &NeoChatConnection::createdRoom, this, [this](Quotient::Room *room) {
|
||||||
resolveResource(room->id());
|
resolveResource(room->id());
|
||||||
|
|||||||
Reference in New Issue
Block a user