Now about page is good. Fixed BUG with play of bells
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user