actions in center don't auto-dismiss, only invoke
This commit is contained in:
parent
51a6323b66
commit
cd99371a89
2 changed files with 6 additions and 2 deletions
|
|
@ -11,6 +11,7 @@ Item {
|
|||
required property var notif // NotifItem (may be null — all accesses use ?.)
|
||||
|
||||
property bool showAppName: true
|
||||
property bool dismissOnAction: true
|
||||
property int iconSize: 32
|
||||
property int bodyMaxLines: 3
|
||||
property color accentColor: M.Theme.base0D
|
||||
|
|
@ -138,7 +139,8 @@ Item {
|
|||
const def = root.notif?.actions?.find(a => a.identifier === "default");
|
||||
if (def) {
|
||||
def.invoke();
|
||||
root.dismissRequested();
|
||||
if (root.dismissOnAction)
|
||||
root.dismissRequested();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -257,7 +259,8 @@ Item {
|
|||
cursorShape: Qt.PointingHandCursor
|
||||
onTapped: {
|
||||
parent.modelData.invoke();
|
||||
M.NotifService.dismiss(root.notif.id);
|
||||
if (root.dismissOnAction)
|
||||
root.dismissRequested();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue