Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to rename categories. #188

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Logikable
Copy link

Closes #145.

@Cidan Cidan self-requested a review February 24, 2024 07:26
@Cidan Cidan self-assigned this Feb 24, 2024
Copy link
Owner

@Cidan Cidan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment below

function categories:RenameCategory(category, newName)
database:RenameCategory(category, newName)
events:SendMessage('categories/Changed')
items:RefreshAll()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to items:FullRefreshAll(), which will force a total redraw.

---@param category string The name of the custom category to rename.
---@param newName string The new name of the category.
function categories:RenameCategory(category, newName)
database:RenameCategory(category, newName)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add categories:DeleteCategory(category) after this line to remove the old category otherwise you get left with the old category with no items associated with it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Rename Custom Categories
3 participants