Commit 8296acf6 authored by Karel Slaný's avatar Karel Slaný

Using a variable to acces mainAccountModel in main account list page.

parent 74c788d2
......@@ -71,6 +71,7 @@ Component {
// Component.onCompleted: {
// }
//}
property var accountModel: mainAccountModel /* Cannot use an alias here. */
Rectangle {
id: datovkaHeader
......@@ -109,9 +110,9 @@ Component {
anchors.fill: parent
onClicked: {
statusBarText.text = ""
if (isds.syncAllAccounts(mainAccountModel)) {
if (isds.syncAllAccounts(accountModel)) {
settings.setLastUpdateToNow()
settings.saveAllSettings(mainAccountModel)
settings.saveAllSettings(accountModel)
}
}
}
......@@ -127,7 +128,7 @@ Component {
pageView.push(pageMenuDatovkaSettings, {
"pageView": pageView,
"statusBar": statusBar,
"accountModel": mainAccountModel
"accountModel": accountModel
}, StackView.Immediate)
}
}
......@@ -149,7 +150,7 @@ Component {
"statusBar": statusBar,
"acntName": "",
"userName": "",
"accountModel": mainAccountModel
"accountModel": accountModel
}, StackView.Immediate)
}
}
......@@ -164,7 +165,7 @@ Component {
visible: true
width: parent.width
interactive: true
model: mainAccountModel
model: accountModel
onCountChanged: {
if (accountList.count == 0) {
accountList.visible = false
......@@ -247,7 +248,7 @@ Component {
"statusBar": statusBar,
"acntName": rAcntName,
"userName": rUserName,
"accountModel": mainAccountModel
"accountModel": accountModel
}, StackView.Immediate)
}
}
......@@ -262,9 +263,9 @@ Component {
MouseArea {
anchors.fill: parent
onClicked: {
if (isds.syncOneAccount(mainAccountModel, rUserName)) {
if (isds.syncOneAccount(accountModel, rUserName)) {
settings.setLastUpdateToNow()
settings.saveAllSettings(mainAccountModel)
settings.saveAllSettings(accountModel)
}
}
}
......@@ -339,7 +340,7 @@ Component {
"acntName": rAcntName,
"userName": rUserName,
"msgType": MessageType.TYPE_RECEIVED,
"accountModel": mainAccountModel
"accountModel": accountModel
}, StackView.Immediate)
}
}
......@@ -408,7 +409,7 @@ Component {
"acntName": rAcntName,
"userName": rUserName,
"msgType": MessageType.TYPE_SENT,
"accountModel": mainAccountModel
"accountModel": accountModel
}, StackView.Immediate)
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment