Fix wait time stopped showing in game tile (#597)

This commit is contained in:
redphx 2024-12-13 05:56:02 +07:00
parent 873f6546a4
commit 15bb18644f
2 changed files with 7 additions and 7 deletions

View File

@ -4615,8 +4615,8 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
let commaIndex = str.indexOf(",", index - 10); let commaIndex = str.indexOf(",", index - 10);
return str = str.substring(0, commaIndex) + ",true" + str.substring(index), str; return str = str.substring(0, commaIndex) + ",true" + str.substring(index), str;
}, },
patchSetCurrentlyFocusedInteractable(str) { patchSetCurrentFocus(str) {
let index = str.indexOf(".setCurrentlyFocusedInteractable=("); let index = str.indexOf(".setCurrentFocus=(");
if (index < 0) return !1; if (index < 0) return !1;
return index = str.indexOf("{", index) + 1, str = PatcherUtils.insertAt(str, index, "e && BxEvent.dispatch(window, BxEvent.NAVIGATION_FOCUS_CHANGED, { element: e });"), str; return index = str.indexOf("{", index) + 1, str = PatcherUtils.insertAt(str, index, "e && BxEvent.dispatch(window, BxEvent.NAVIGATION_FOCUS_CHANGED, { element: e });"), str;
}, },
@ -4704,7 +4704,7 @@ ${subsVar} = subs;
"enableTvRoutes", "enableTvRoutes",
"supportLocalCoOp", "supportLocalCoOp",
"overrideStorageGetSettings", "overrideStorageGetSettings",
getPref("ui.gameCard.waitTime.show") && "patchSetCurrentlyFocusedInteractable", getPref("ui.gameCard.waitTime.show") && "patchSetCurrentFocus",
getPref("ui.layout") !== "default" && "websiteLayout", getPref("ui.layout") !== "default" && "websiteLayout",
getPref("game.fortnite.forceConsole") && "forceFortniteConsole", getPref("game.fortnite.forceConsole") && "forceFortniteConsole",
...STATES.userAgent.capabilities.touch ? [ ...STATES.userAgent.capabilities.touch ? [

View File

@ -835,9 +835,9 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
return str; return str;
}, },
// 24225.js#4127, 24.17.11 // 49851.js#4083, 27.0.4
patchSetCurrentlyFocusedInteractable(str: string) { patchSetCurrentFocus(str: string) {
let index = str.indexOf('.setCurrentlyFocusedInteractable=('); let index = str.indexOf('.setCurrentFocus=(');
if (index < 0) { if (index < 0) {
return false; return false;
} }
@ -1017,7 +1017,7 @@ let PATCH_ORDERS = PatcherUtils.filterPatches([
'supportLocalCoOp', 'supportLocalCoOp',
'overrideStorageGetSettings', 'overrideStorageGetSettings',
getPref(PrefKey.UI_GAME_CARD_SHOW_WAIT_TIME) && 'patchSetCurrentlyFocusedInteractable', getPref(PrefKey.UI_GAME_CARD_SHOW_WAIT_TIME) && 'patchSetCurrentFocus',
getPref<UiLayout>(PrefKey.UI_LAYOUT) !== UiLayout.DEFAULT && 'websiteLayout', getPref<UiLayout>(PrefKey.UI_LAYOUT) !== UiLayout.DEFAULT && 'websiteLayout',
getPref(PrefKey.GAME_FORTNITE_FORCE_CONSOLE) && 'forceFortniteConsole', getPref(PrefKey.GAME_FORTNITE_FORCE_CONSOLE) && 'forceFortniteConsole',