diff options
-rw-r--r-- | contents/ui/ActivityView.qml | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/contents/ui/ActivityView.qml b/contents/ui/ActivityView.qml index 4b32cf4..3484eed 100644 --- a/contents/ui/ActivityView.qml +++ b/contents/ui/ActivityView.qml @@ -40,14 +40,15 @@ PlasmaComponents.ListItem { } let finishedActivities = plasmoid.configuration[configKeys[type]] + const activityIdStr = activityId.toString() if (finished) { - if (!finishedActivities.includes(activityId)) { - finishedActivities.push(activityId) + if (!finishedActivities.includes(activityIdStr)) { + finishedActivities.push(activityIdStr) } } else { - // remove activityId from list + // remove activityIdStr from list finishedActivities.splice( - finishedActivities.indexOf(activityId), 1 + finishedActivities.indexOf(activityIdStr), 1 ) } // save config @@ -112,14 +113,16 @@ PlasmaComponents.ListItem { } let importantActivities = plasmoid.configuration[configKeys[type]] + const activityIdStr = activityId.toString() + if (important) { - if (!importantActivities.includes(activityId)) { - importantActivities.push(activityId) + if (!importantActivities.includes(activityIdStr)) { + importantActivities.push(activityIdStr) } } else { - // remove activityId from list + // remove activityIdStr from list importantActivities.splice( - importantActivities.indexOf(activityId), 1 + importantActivities.indexOf(activityIdStr), 1 ) } // save config |