~fkfd/kanvas

dacaf4de37c3749c44ca16c7d609ac6977e6bb49 — Frederick Yin 11 months ago 3d6239a
Fix dynamic typing bug
1 files changed, 11 insertions(+), 8 deletions(-)

M contents/ui/ActivityView.qml
M contents/ui/ActivityView.qml => contents/ui/ActivityView.qml +11 -8
@@ 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