mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-06 21:28:27 +02:00
App option to disable context menu in Home page
This commit is contained in:
@@ -2,6 +2,7 @@ import { STATES } from "@utils/global";
|
||||
import { BxLogger } from "./bx-logger";
|
||||
import { TouchController } from "@modules/touch-controller";
|
||||
import { GamePassCloudGallery } from "./gamepass-gallery";
|
||||
import { getPref, PrefKey } from "./preferences";
|
||||
|
||||
const LOG_TAG = 'PreloadState';
|
||||
|
||||
@@ -41,6 +42,14 @@ export function overridePreloadState() {
|
||||
}
|
||||
}
|
||||
|
||||
if (getPref(PrefKey.UI_HOME_CONTEXT_MENU_DISABLED)) {
|
||||
try {
|
||||
state.experiments.experimentationInfo.data.treatments.EnableHomeContextMenu = false;
|
||||
} catch (e) {
|
||||
BxLogger.error(LOG_TAG, e);
|
||||
}
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
_state = state;
|
||||
STATES.appContext = structuredClone(state.appContext);
|
||||
|
Reference in New Issue
Block a user