forked from Vendicated/Vencord
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix pronouns loading without clicking on profile
Fixes Vendicated#2967 Implement a caching mechanism for pronouns to load them without the need to click on the user's profile. * **Caching Mechanism**: - Implement caching using `DataStore` in `src/plugins/userMessagesPronouns/utils.ts`. - Add functions to get, set, and fetch pronouns with caching. - Modify `useDiscordPronouns` to check the cache before fetching pronouns. - Export `fetchAndCachePronouns` function. * **PronounsChatComponent**: - Update `PronounsChatComponent` in `src/plugins/userMessagesPronouns/PronounsChatComponent.tsx` to use cached pronouns if available. * **Message Events**: - Add logic in `src/plugins/userMessagesPronouns/index.ts` to fetch and cache pronouns when a user sends a message. - Add export for `MessageEvents` in `src/api/MessageEvents.ts`.
- Loading branch information
1 parent
e620431
commit e4a1f93
Showing
5 changed files
with
57 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"tasks": { | ||
"test": "pnpm install && pnpm test", | ||
"build": "pnpm install --frozen-lockfile && pnpm build", | ||
"launch": "pnpm install && pnpm dev" | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters