Remove Controller::accountCount in favor of AccountRegistry::accountCount
This commit is contained in:
@@ -40,12 +40,12 @@ Labs.MenuBar {
|
||||
|
||||
Labs.MenuItem {
|
||||
text: i18nc("menu", "New Private Chat…")
|
||||
enabled: pageStack.layers.currentItem.title !== i18n("Start a Chat") && Controller.accountCount > 0
|
||||
enabled: pageStack.layers.currentItem.title !== i18n("Start a Chat") && AccountRegistry.accountCount > 0
|
||||
onTriggered: pushReplaceLayer("qrc:/StartChatPage.qml", {connection: Controller.activeConnection})
|
||||
}
|
||||
Labs.MenuItem {
|
||||
text: i18nc("menu", "New Group…")
|
||||
enabled: pageStack.layers.currentItem.title !== i18n("Start a Chat") && Controller.accountCount > 0
|
||||
enabled: pageStack.layers.currentItem.title !== i18n("Start a Chat") && AccountRegistry.accountCount > 0
|
||||
shortcut: StandardKey.New
|
||||
onTriggered: {
|
||||
const dialog = createRoomDialog.createObject(root.overlay)
|
||||
|
||||
@@ -79,7 +79,7 @@ FormCard.FormCardPage {
|
||||
Dialog.ConfirmLogout {
|
||||
connection: model.connection
|
||||
onAccepted: {
|
||||
if (Controller.accountCount === 1) {
|
||||
if (AccountRegistry.accountCount === 1) {
|
||||
root.Window.window.close()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ Kirigami.ApplicationWindow {
|
||||
target: Controller
|
||||
|
||||
function onInitiated() {
|
||||
if (Controller.accountCount === 0) {
|
||||
if (AccountRegistry.accountCount === 0) {
|
||||
pageStack.replace("qrc:/WelcomePage.qml", {});
|
||||
} else if (!roomListLoaded) {
|
||||
pageStack.replace(roomListComponent, {
|
||||
|
||||
Reference in New Issue
Block a user