Fix notification for deleted entries
This commit is contained in:
parent
56243eb70c
commit
9428f449bd
|
@ -72,19 +72,18 @@ Kirigami.ScrollablePage {
|
||||||
}
|
}
|
||||||
|
|
||||||
function confirmDeletion(entryName, entryIndex) {
|
function confirmDeletion(entryName, entryIndex) {
|
||||||
// skip if undo is supported
|
var isNode = entryModel.isNode(entryModel.index(entryIndex, 0,
|
||||||
|
rootIndex))
|
||||||
|
var entryType = isNode ? qsTr("category ") : qsTr("account ")
|
||||||
|
this.entryIndex = entryIndex
|
||||||
|
this.entryDesc = entryType + entryName
|
||||||
|
|
||||||
|
// skip dialog if undo is supported
|
||||||
if (nativeInterface.undoStack) {
|
if (nativeInterface.undoStack) {
|
||||||
entryModel.removeRows(entryIndex, 1, rootIndex)
|
entryModel.removeRows(entryIndex, 1, rootIndex)
|
||||||
showPassiveNotification(qsTr("Deleted %1").arg(entryDesc))
|
showPassiveNotification(qsTr("Deleted %1").arg(entryDesc))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var isNode = entryModel.isNode(entryModel.index(entryIndex, 0,
|
|
||||||
rootIndex))
|
|
||||||
var entryType = isNode ? qsTr("category ") : qsTr("account ")
|
|
||||||
|
|
||||||
this.entryIndex = entryIndex
|
|
||||||
this.entryDesc = entryType + entryName
|
|
||||||
this.open()
|
this.open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue