parent
1c2d573f1d
commit
1b934db3ab
1 changed files with 2 additions and 2 deletions
|
|
@ -1044,7 +1044,7 @@ 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: /(?<=function \i\((\i).{0,100}?useRef\(0\);)(return \i.useMemo\(\(\)=>{)/,
|
||||
match: /(?<=function \i\((\i),\i,\i\){let \i=\i.useRef.{0,100}?;)(return \i.useMemo\(\(\)=>{)/,
|
||||
replace: "const questRerenderTrigger=$self.useQuestRerender();const questifySorted=$self.sortQuests($1,arguments[1].sortMethod!==\"questify\");$2if(arguments[1].sortMethod===\"questify\"){$1=questifySorted;};"
|
||||
},
|
||||
{
|
||||
|
|
@ -1059,7 +1059,7 @@ export default definePlugin({
|
|||
},
|
||||
{
|
||||
// Add the trigger to the memo for rerendering Quests order due to progress changes, etc.
|
||||
match: /(?<=current=\i\.length,\i},\[\i,\i,\i)/,
|
||||
match: /(?<=id\);.{0,100}?,\i},\[\i,\i,\i)/,
|
||||
replace: ",questRerenderTrigger,questifySorted"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue