-
-
Notifications
You must be signed in to change notification settings - Fork 130
Open
Description
- I am on the latest ActivityWatch version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- OS name and version: Linux Mint 22.1 Cinnamon
- ActivityWatch version: v0.13.2
Describe the bug
It seems like updating the name or adding a subcategory of a category updates all categories that have the same name "path".
This is especially evident when making multiple new categories (which all have default name "New Class") and tying to update one of them.
To Reproduce
- In the settings page add 2 new subcategories with the default "New class" name
- Edit one of the categories' names and observe both names change
- Add a new subcategory to one of them and it gets added to both
Expected behavior
Only the selected category changes
Documentation
Additional context
I believe the renaming issue has something to do with this section:
aw-webui/src/stores/categories.ts
Lines 167 to 173 in f38b119
| // When a parent category is renamed, we also need to rename the children | |
| _.map(this.classes, c => { | |
| if (_.isEqual(old_name, c.name.slice(0, parent_depth))) { | |
| c.name = new_class.name.concat(c.name.slice(parent_depth)); | |
| console.log('Renamed child:', c.name); | |
| } | |
| }); |
Not too sure of the cause of the adding subcategory issue
Metadata
Metadata
Assignees
Labels
No labels