Commit bebb4ad8 authored by Eugene Popov's avatar Eugene Popov 🇺🇦 Committed by Nate Graham
Browse files

[applets/notifications] Always close plasmoid when emptied

It's wrong to check the status of the plasmoid before closing it,
since the status is just the internal state of the plasmoid and
it's changed by actions from the plasmoid itself. So, the Passive
status doesn't indicate that the plasmoid is hidden in the system
tray, because the user can configure to always show this plasmoid.
parent 92a4d012
......@@ -407,10 +407,7 @@ PlasmaComponents3.Page {
closable: model.closable
closeButtonTooltip: i18n("Close Group")
onCloseClicked: {
historyModel.close(historyModel.index(index, 0))
}
onCloseClicked: historyModel.close(historyModel.index(index, 0))
onConfigureClicked: historyModel.configure(historyModel.index(index, 0))
}
}
......@@ -502,7 +499,7 @@ PlasmaComponents3.Page {
onDismissClicked: {
model.dismissed = false;
root.closePassivePlasmoid();
root.closePlasmoid();
}
onConfigureClicked: historyModel.configure(historyModel.index(index, 0))
......
......@@ -146,7 +146,7 @@ Item {
onCountChanged: {
if (count === 0) {
closePassivePlasmoid();
closePlasmoid();
}
}
}
......@@ -158,8 +158,8 @@ Item {
restoreMode: Binding.RestoreBinding
}
function closePassivePlasmoid() {
if (plasmoid.status !== PlasmaCore.Types.PassiveStatus && plasmoid.hideOnWindowDeactivate) {
function closePlasmoid() {
if (plasmoid.hideOnWindowDeactivate) {
plasmoid.expanded = false;
}
}
......@@ -167,7 +167,7 @@ Item {
function action_clearHistory() {
historyModel.clear(NotificationManager.Notifications.ClearExpired);
if (historyModel.count === 0) {
closePassivePlasmoid();
closePlasmoid();
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment