Refactor startup
This commit is contained in:
20
qml/main.qml
20
qml/main.qml
@@ -312,24 +312,11 @@ Kirigami.ApplicationWindow {
|
||||
id: roomList
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: LoginHelper
|
||||
function onInitialSyncFinished() {
|
||||
pageStack.replace(roomListComponent, {
|
||||
activeConnection: Controller.activeConnection
|
||||
});
|
||||
roomListLoaded = true;
|
||||
RoomManager.loadInitialRoom();
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: Controller
|
||||
|
||||
function onInitiated() {
|
||||
if (RoomManager.hasOpenRoom) {
|
||||
return;
|
||||
}
|
||||
if (Controller.accountCount === 0) {
|
||||
pageStack.replace("qrc:/imports/NeoChat/Page/WelcomePage.qml", {});
|
||||
} else {
|
||||
@@ -341,13 +328,6 @@ Kirigami.ApplicationWindow {
|
||||
}
|
||||
}
|
||||
|
||||
function onBusyChanged() {
|
||||
if(!Controller.busy && roomListLoaded === false) {
|
||||
pageStack.replace(roomListComponent);
|
||||
roomListLoaded = true;
|
||||
}
|
||||
}
|
||||
|
||||
function onConnectionDropped() {
|
||||
if (Controller.accountCount === 0) {
|
||||
RoomManager.reset();
|
||||
|
||||
Reference in New Issue
Block a user