Questify: Fix Crashing PT 2
This commit is contained in:
parent
73cfc9f935
commit
5c2a64eb03
2 changed files with 7 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "equicord",
|
||||
"private": "true",
|
||||
"version": "1.14.9.1",
|
||||
"version": "1.14.9.2",
|
||||
"description": "The other cutest Discord client mod",
|
||||
"homepage": "https://github.com/Equicord/Equicord#readme",
|
||||
"bugs": {
|
||||
|
|
|
|||
|
|
@ -1694,8 +1694,12 @@ export default definePlugin({
|
|||
// Run Questify's sort function every time due to hook requirements but return
|
||||
// early if not applicable. If the sort method is set to "Questify", replace the
|
||||
// Quests with the sorted ones. Also, setup a trigger to rerender the memo.
|
||||
match: /(?<=\.filters\),.{0,30})(\i.useMemo\(\(\)=>{)(?=if\(0===(\i).length\))/,
|
||||
replace: "questRerenderTrigger=$self.useQuestRerender(),questifySorted=$self.sortQuests($2,arguments[1].sortMethod!==\"questify\"),$1if(arguments[1].sortMethod===\"questify\"){$2=questifySorted;};"
|
||||
match: /(?<=quests:(\i).{0,150}"use_filtered_quests".{0,25}\i\.id,\i\]\)\)),/,
|
||||
replace: ";const questRerenderTrigger=$self.useQuestRerender();const questifySorted=$self.sortQuests($1,arguments[1].sortMethod!==\"questify\");let "
|
||||
},
|
||||
{
|
||||
match: /(?=if\(0===(\i).length\).{0,100}\.sortMethod&&\i\.current)/,
|
||||
replace: "if(arguments[1].sortMethod===\"questify\"){$1=questifySorted;};"
|
||||
},
|
||||
{
|
||||
// Account for Quest status changes.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue