Fix multiple notifications (hopefully), add screenshots
This commit is contained in:
parent
03960a5636
commit
c4b2ccd87b
5 changed files with 21 additions and 13 deletions
|
@ -59,6 +59,16 @@ Page {
|
|||
previewSummary: summary
|
||||
previewBody: body
|
||||
urgency: Notification.Critical
|
||||
function republish() {
|
||||
if(replacesId > 0)
|
||||
close()
|
||||
publish()
|
||||
}
|
||||
function republishTest() {
|
||||
test = true
|
||||
republish()
|
||||
test = false
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
|
@ -69,15 +79,16 @@ Page {
|
|||
onTriggered: {
|
||||
if(battery.charge <= settings.lowerLimit && battery.state === "discharging") {
|
||||
alertLow.play()
|
||||
notification.publish()
|
||||
notification.republish()
|
||||
}
|
||||
else if(battery.charge >= settings.upperLimit &&
|
||||
(battery.state === "charging" && battery.charging === true) || (battery.state === "idle" && battery.charging === false)) {
|
||||
alertHigh.play()
|
||||
notification.publish()
|
||||
notification.republish()
|
||||
}
|
||||
else
|
||||
else if(notification.replacesId > 0) {
|
||||
notification.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -179,14 +190,12 @@ Page {
|
|||
height: lowButton.height
|
||||
Button {
|
||||
id: lowButton
|
||||
anchors.centerIn: parent
|
||||
text: qsTr("Discharged")
|
||||
onClicked: {
|
||||
alertLow.play()
|
||||
notification.test = true
|
||||
notification.publish()
|
||||
notification.test = false
|
||||
notification.republishTest()
|
||||
}
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
}
|
||||
Item {
|
||||
|
@ -195,13 +204,11 @@ Page {
|
|||
height: lowButton.height
|
||||
Button {
|
||||
text: qsTr("Charged")
|
||||
anchors.centerIn: parent
|
||||
onClicked: {
|
||||
alertHigh.play()
|
||||
notification.test = true
|
||||
notification.publish()
|
||||
notification.test = false
|
||||
notification.republishTest()
|
||||
}
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,11 +12,12 @@
|
|||
# * date Author's Name <author's email> version-release
|
||||
# - Summary of changes
|
||||
|
||||
* Sun Feb 10 2019 Matti Viljanen (direc85) <matti.viljanen@kapsi.fi> 1.2-1
|
||||
- Don't stop media playback
|
||||
* Mon Feb 11 2019 Matti Viljanen (direc85) <matti.viljanen@kapsi.fi> 1.2-1
|
||||
- Alert doesn't stop media playback
|
||||
- Add battery graphic
|
||||
- Redesign cover page
|
||||
- Poll changes more often
|
||||
- Fix multiple notifications (hopefully)
|
||||
|
||||
* Tue Jan 8 2019 Matti Viljanen (direc85) <matti.viljanen@kapsi.fi> 1.1-1
|
||||
- Slider values are now saved
|
||||
|
|
BIN
screenshot1.png
Normal file
BIN
screenshot1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 321 KiB |
BIN
screenshot2.png
Normal file
BIN
screenshot2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 186 KiB |
BIN
screenshot3.png
Normal file
BIN
screenshot3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 542 KiB |
Loading…
Reference in a new issue