Commit 0fd991aa authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[Notifications] Don't reverse() Array

This mutates the source array.
In practice actions don't really change in existing notifications but still better to not do that.

Differential Revision: https://phabricator.kde.org/D28650
parent ac0124c4
......@@ -317,10 +317,10 @@ ColumnLayout {
model: {
var buttons = [];
var actionNames = (notificationItem.actionNames || []);
var actionLabels = (notificationItem.actionLabels || []);
// HACK We want the actions to be right-aligned but Flow also reverses
var actionNames = (notificationItem.actionNames || []).reverse();
var actionLabels = (notificationItem.actionLabels || []).reverse();
for (var i = 0; i < actionNames.length; ++i) {
for (var i = actionNames.length - 1; i >= 0; --i) {
buttons.push({
actionName: actionNames[i],
label: actionLabels[i]
......
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