Skip to content

Commit

Permalink
Rename alarmButton to silenceAllButton and remove invalid binding
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeTrahearn-Qinetic committed Feb 20, 2025
1 parent 5c45048 commit 95b1b48
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions components/StatusBar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Rectangle {
property int leftButton: VenusOS.StatusBar_LeftButton_None
property int rightButton: VenusOS.StatusBar_RightButton_None
readonly property bool notificationButtonsEnabled: Global.mainView.currentPage && !!Global.mainView.currentPage.url && Global.mainView.currentPage.url.endsWith("NotificationsPage.qml")
readonly property bool notificationButtonVisible: alertButton.enabled || alertButton.animating || alarmButton.enabled || alarmButton.animating
readonly property bool notificationButtonVisible: silenceAllButton.enabled || silenceAllButton.animating

property bool animationEnabled

Expand Down Expand Up @@ -215,20 +215,20 @@ Rectangle {
}

NotificationButton {
id: alarmButton
id: silenceAllButton

anchors {
right: rightSideRow.right
verticalCenter: parent.verticalCenter
}
enabled: notificationButtonsEnabled &&
((Global.notifications?.alarms.hasUnsilenced ?? false) ||
(Global.notifications?.alarms.hasActive ?? false))
enabled: notificationButtonsEnabled && (Global.notifications?.hasUnsilencedNotifications ?? false)
// TODO: confirm the color
backgroundColor: Theme.color_critical_background
icon.source: "qrc:/images/icon_alarm_snooze_24.svg"

//% "Silence alarm"
text: qsTrId("notifications_silence_alarm")
// TODO: confirm the text
//% "Silence All"
text: qsTrId("notifications_silence_all")

onClicked: Global.notifications.silenceAll()
}
Expand Down

0 comments on commit 95b1b48

Please sign in to comment.