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

[Bug] TextReplace settings don't load when the plugin is disabled #2688

Open
2 tasks done
plus024 opened this issue Jul 12, 2024 · 0 comments
Open
2 tasks done

[Bug] TextReplace settings don't load when the plugin is disabled #2688

plus024 opened this issue Jul 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@plus024
Copy link

plus024 commented Jul 12, 2024

Discord Account

No response

What happens when the bug or crash occurs?

Since TextReplace rules are stored in IndexedDB, they aren't loaded in the same way regular settings are and are instead loaded through DataStore.get() in the plugin's start function
https://github.com/Vendicated/Vencord/blob/main/src/plugins/textReplace/index.tsx#L251-L253

Because of this, when the plugin is disabled (at startup) your TextReplace rules won't get loaded and the settings will appear empty

What is the expected behaviour?

I expect the TextReplace rules to always be visible. To be honest, this isn't a very impactful bug since the workaround is to just toggle TextReplace off and on

How do you recreate this bug or crash?

  1. Have TextReplace rules
  2. Disable TextReplace
  3. Restart Discord
  4. Observe in TextReplace settings that your rules are gone
  5. Enable TextReplace
  6. Observe in TextReplace settings that your rules are back

Errors

No response

Request Agreement

  • I am using Discord Stable or tried on Stable and this bug happens there as well
  • I have read the requirements for opening an issue above
@plus024 plus024 added the bug Something isn't working label Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant