diff --git a/src/equicordplugins/questify/index.tsx b/src/equicordplugins/questify/index.tsx index 7a619b68d..2c9241527 100644 --- a/src/equicordplugins/questify/index.tsx +++ b/src/equicordplugins/questify/index.tsx @@ -1036,10 +1036,22 @@ export default definePlugin({ ] }, { - // Sorts the "All Quests" tab. + // Adds the "Questify" sort option to the sort enum. + find: "SUGGESTED=\"suggested\",", + replacement: { + match: /return ((\i).SUGGESTED="suggested",)/, + replace: "return $2.QUESTIFY=\"questify\",$1" + } + }, + { find: "CLAIMED=\"claimed\",", group: true, replacement: [ + { + // Adds the "Questify" sort option to the sort dropdown. + match: /(?=case (\i.\i).SUGGESTED)/, + replace: "case $1.QUESTIFY:return \"Questify\";" + }, { // 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 @@ -1064,24 +1076,6 @@ export default definePlugin({ } ] }, - { - // Adds the "Questify" sort option to the sort enum. - find: "SUGGESTED=\"suggested\",", - replacement: { - match: /return ((\i).SUGGESTED="suggested",)/, - replace: "return $2.QUESTIFY=\"questify\",$1" - } - }, - { - // Adds the "Questify" sort option to the sort dropdown. - find: "#{intl::K6oEu7::raw}", - replacement: [ - { - match: /(?=case (\i.\i).SUGGESTED)/, - replace: "case $1.QUESTIFY:return \"Questify\";" - } - ] - }, { // Loads the last used sort method and filter choices. // Defaults to sorting by "Questify" and no filters. @@ -1108,11 +1102,6 @@ export default definePlugin({ match: /(onChange:)(\i)(.{0,40}?selectedFilters)/, replace: "$1(value)=>{$self.settings.store.lastQuestPageFilters=value.reduce((acc,item)=>({...acc,[item.filter]:item}),{});$2(value);}$3" }, - ] - }, - { - find: "filterSortOption,selectedFilters", - replacement: [ { // Update the last used sort and filter choices when the toggle setting for either is changed. match: /(\[(\i),\i\]=\i.useState.{0,80}?\[(\i),\i\]=\i.useState.{0,350}?)(return \i.useEffect)/,