Merge remote-tracking branch 'origin/small-fixes' into landing-silo

This commit is contained in:
Jenkins 2018-07-04 16:48:15 +02:00
commit b03360ec22
3 changed files with 12 additions and 6 deletions

View File

@ -14,12 +14,14 @@ win32:Release:LIBS += -L$$top_builddir/libnymea-app-core/release \
-L$$top_builddir/libnymea-common/release
linux:!android:LIBS += -lavahi-client -lavahi-common
PRE_TARGETDEPS += ../libnymea-app-core ../libnymea-common
HEADERS += \
stylecontroller.h
SOURCES += main.cpp \
stylecontroller.cpp
OTHER_FILES += $$files(*.qml, true)
RESOURCES += resources.qrc
equals(STYLES_PATH, "") {

View File

@ -78,17 +78,21 @@ Page {
id: swipeView
clip: true
anchors.fill: parent
currentIndex: settings.currentMainViewIndex
onCurrentIndexChanged: settings.currentMainViewIndex = currentIndex
opacity: Engine.deviceManager.fetchingData ? 0 : 1
Behavior on opacity { NumberAnimation { duration: 300 } }
onCurrentIndexChanged: {
settings.currentMainViewIndex = currentIndex
}
Component.onCompleted: {
if (Engine.jsonRpcClient.ensureServerVersion(1.6)) {
swipeView.insertItem(0, favoritesViewComponent.createObject(swipeView))
} else if (settings.currentMainViewIndex === 2) {
settings.currentMainViewIndex = 0;
}
if (settings.currentMainViewIndex > swipeView.count) {
settings.currentMainViewIndex = swipeView.count - 1;
}
swipeView.currentIndex = Qt.binding(function() { return settings.currentMainViewIndex; })
}
Component {

View File

@ -737,7 +737,7 @@ Page {
model: ListModel {
ListElement {
iconName: "../images/action.svg"
text: qsTr("Execute an action on of my things")
text: qsTr("Execute an action on one of my things")
method: "addRuleAction"
isExitAction: false
minimumJsonRpcVersion: "1.0"
@ -751,7 +751,7 @@ Page {
}
ListElement {
iconName: "../images/action.svg"
text: qsTr("Execute an action on of my things")
text: qsTr("Execute an action on one of my things")
method: "addRuleExitAction"
isExitAction: true
minimumJsonRpcVersion: "1.0"