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

Toggle logic cleanup #2527

Merged
merged 3 commits into from
Aug 28, 2024
Merged

Conversation

MyDrift-user
Copy link
Contributor

@MyDrift-user MyDrift-user commented Aug 6, 2024

Pull Request

Toggle logic cleanup

Type of Change

  • Refactoring

Description

Cleaning up the logics for the Toggles

  • Toggles & buttons need a total rework some day, but this will do for now

Testing

  • tested, works

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no errors/warnings/merge conflicts.

- cleanup Invoke-WPFToggle.ps1
- add attributes member to tweaks
- add "eprestart" for restart explorer to attributes.
- removed restart explorer logics from existing toggles.
- add restart explorer logics to Invoke-WPFToggle.ps1 depending on attribute content
@ChrisTitusTech
Copy link
Owner

I'm not sure I see the benefit in this other than code not duplicating in a few areas, but the downside is it get a bit more convoluted with another JSON attribute which adds a lot of lines to the code.

@MyDrift-user
Copy link
Contributor Author

MyDrift-user commented Aug 7, 2024

I made "attributes" to remove the need of adding a new attribute for optional stuff to the json files in the future.
The plan behind it is "attribute" should allow multiple values in an array, which then can be used in various ways for future additions/changes. For example not show Windows 11 tweaks on a Windows 10 machine or smth like that. This attribute would only be added where neccessary.

But I can remove that part of the PR if you'd like.

@MyDrift-user MyDrift-user changed the title Toggle logic cleanup + "attributes" addition Toggle logic cleanup Aug 24, 2024
@MyDrift-user
Copy link
Contributor Author

I removed the attribute and restart explorer logic.

@ChrisTitusTech ChrisTitusTech merged commit 46f827f into ChrisTitusTech:main Aug 28, 2024
1 check passed
@ChrisTitusTech ChrisTitusTech added the skip-changelog Skip Change Logs label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Skip Change Logs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants