This commit is contained in:
Etorix 2025-10-09 16:57:14 -07:00 • committed by GitHub
parent 71103ada6b
commit 32a53b4f94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)/,