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
|
previewSummary: summary
|
||||||
previewBody: body
|
previewBody: body
|
||||||
urgency: Notification.Critical
|
urgency: Notification.Critical
|
||||||
|
function republish() {
|
||||||
|
if(replacesId > 0)
|
||||||
|
close()
|
||||||
|
publish()
|
||||||
|
}
|
||||||
|
function republishTest() {
|
||||||
|
test = true
|
||||||
|
republish()
|
||||||
|
test = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
|
@ -69,15 +79,16 @@ Page {
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
if(battery.charge <= settings.lowerLimit && battery.state === "discharging") {
|
if(battery.charge <= settings.lowerLimit && battery.state === "discharging") {
|
||||||
alertLow.play()
|
alertLow.play()
|
||||||
notification.publish()
|
notification.republish()
|
||||||
}
|
}
|
||||||
else if(battery.charge >= settings.upperLimit &&
|
else if(battery.charge >= settings.upperLimit &&
|
||||||
(battery.state === "charging" && battery.charging === true) || (battery.state === "idle" && battery.charging === false)) {
|
(battery.state === "charging" && battery.charging === true) || (battery.state === "idle" && battery.charging === false)) {
|
||||||
alertHigh.play()
|
alertHigh.play()
|
||||||
notification.publish()
|
notification.republish()
|
||||||
}
|
}
|
||||||
else
|
else if(notification.replacesId > 0) {
|
||||||
notification.close()
|
notification.close()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,14 +190,12 @@ Page {
|
||||||
height: lowButton.height
|
height: lowButton.height
|
||||||
Button {
|
Button {
|
||||||
id: lowButton
|
id: lowButton
|
||||||
|
anchors.centerIn: parent
|
||||||
text: qsTr("Discharged")
|
text: qsTr("Discharged")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
alertLow.play()
|
alertLow.play()
|
||||||
notification.test = true
|
notification.republishTest()
|
||||||
notification.publish()
|
|
||||||
notification.test = false
|
|
||||||
}
|
}
|
||||||
anchors.centerIn: parent
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
|
@ -195,13 +204,11 @@ Page {
|
||||||
height: lowButton.height
|
height: lowButton.height
|
||||||
Button {
|
Button {
|
||||||
text: qsTr("Charged")
|
text: qsTr("Charged")
|
||||||
|
anchors.centerIn: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
alertHigh.play()
|
alertHigh.play()
|
||||||
notification.test = true
|
notification.republishTest()
|
||||||
notification.publish()
|
|
||||||
notification.test = false
|
|
||||||
}
|
}
|
||||||
anchors.centerIn: parent
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,11 +12,12 @@
|
||||||
# * date Author's Name <author's email> version-release
|
# * date Author's Name <author's email> version-release
|
||||||
# - Summary of changes
|
# - Summary of changes
|
||||||
|
|
||||||
* Sun Feb 10 2019 Matti Viljanen (direc85) <matti.viljanen@kapsi.fi> 1.2-1
|
* Mon Feb 11 2019 Matti Viljanen (direc85) <matti.viljanen@kapsi.fi> 1.2-1
|
||||||
- Don't stop media playback
|
- Alert doesn't stop media playback
|
||||||
- Add battery graphic
|
- Add battery graphic
|
||||||
- Redesign cover page
|
- Redesign cover page
|
||||||
- Poll changes more often
|
- Poll changes more often
|
||||||
|
- Fix multiple notifications (hopefully)
|
||||||
|
|
||||||
* Tue Jan 8 2019 Matti Viljanen (direc85) <matti.viljanen@kapsi.fi> 1.1-1
|
* Tue Jan 8 2019 Matti Viljanen (direc85) <matti.viljanen@kapsi.fi> 1.1-1
|
||||||
- Slider values are now saved
|
- 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