Now about page is good. Fixed BUG with play of bells

This commit is contained in:
2017-08-23 12:02:27 +02:00
parent 01d5dd2f9c
commit 08cca3e186
9 changed files with 186 additions and 55 deletions

View File

@@ -33,6 +33,7 @@ import Sailfish.Silica 1.0
import Pw.Unitoo.Backend 1.0
import "js/converter.js" as Converter
import "js/helpers.js" as Helper
Page {
id: settingsPage
@@ -46,17 +47,9 @@ Page {
property int mRoundMs: settings.roundsMs
property int mRestMs: settings.restMs
function pushPopPresetListPage() {
if (settings.presetsList().length > 0) {
pageStack.pushAttached(Qt.resolvedUrl("PresetList.qml"))
} else {
pageStack.popAttached()
}
}
onStatusChanged: {
if (status === PageStatus.Active) {
pushPopPresetListPage();
Helper.pushPresetListPage();
}
}
@@ -73,20 +66,11 @@ Page {
roundsSlider.value,
roundsTimeSlider.value,
Converter.sToMs(restSlider.value)
)
)
pushPopPresetListPage();
}
}
}
boxingTimer.loadPreset(presetName.text)
PushUpMenu {
MenuItem {
text: qsTr("Delete")
onClicked: {
settings.deletePreset(presetName.text)
pushPopPresetListPage();
Helper.pushPresetListPage();
}
}
}