Questify: Fixes. (#904)
This commit is contained in:
parent
b442f4e675
commit
8efccc960e
2 changed files with 11 additions and 3 deletions
|
|
@ -1388,8 +1388,8 @@ export default definePlugin({
|
|||
},
|
||||
{
|
||||
// Prevent SearchableSelect from force-scrolling into view, causing the dropdown to close.
|
||||
match: /(?<=\.scrollIntoView\()/,
|
||||
replace: "{block:\"nearest\",inline:\"nearest\"}"
|
||||
match: /(&&\i.current\?\.scrollIntoView\(\))/,
|
||||
replace: ""
|
||||
},
|
||||
{
|
||||
// Passes a popoutClassName and optionClassName to the popout handler.
|
||||
|
|
@ -1419,6 +1419,14 @@ export default definePlugin({
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
// Prevent the new version of SearchableSelect from force-scrolling into view.
|
||||
find: '"data-mana-component":"combobox",',
|
||||
replacement: {
|
||||
match: /\i.current\?\.scrollIntoView\({.{0,50}?}\)/,
|
||||
replace: ""
|
||||
}
|
||||
},
|
||||
{
|
||||
// Formats the Orbs balance on the Quests page with locale string formatting.
|
||||
find: '("BalanceCounter")',
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ export function getQuestProgress(quest: Quest, task: QuestTask) {
|
|||
export function getQuestTarget(task: QuestTask) {
|
||||
const isWatch = task.type === QuestTaskType.WATCH_VIDEO || task.type === QuestTaskType.WATCH_VIDEO_ON_MOBILE;
|
||||
const raw = task.target;
|
||||
const adjusted = raw - (isWatch ? videoQuestLeeway : 0);
|
||||
const adjusted = Math.max(0, raw - (isWatch ? videoQuestLeeway : 0));
|
||||
return { raw, adjusted };
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue