Commit 3d85454f authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

[Notification Job Delegate] Slightly optimize summary label

Instead of splitting, just use lastIndexOf and slice.
This is 2x as fast.

Differential Revision:
parent ec31a507
......@@ -63,8 +63,9 @@ Column {
Layout.fillWidth: true
elide: Text.ElideMiddle
text: {
var labelSplit = label0.split("/")
return labelSplit[labelSplit.length-1]
var label = label0;
var lastSlashIdx = label.lastIndexOf("/");
return label.slice(lastSlashIdx + 1);
textFormat: Text.PlainText
Markdown is supported
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