decord/alpha/source/modules/user_settings/FrecencyUserSettingsHooks.tsx

80 lines
2.5 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 9711
// Function ID: 9712
// Name: FrecencyUserSettingsHooks
2026-10-09 10:00:15 +00:00
// Dependencies: [19, 1244, 558, 576, 2046, 504, 2]
2026-07-20 16:05:17 +00:00
2026-10-09 10:00:15 +00:00
// Module 9711 (FrecencyUserSettingsHooks)
import UserSettingsProtoActionCreators from "UserSettingsProtoActionCreators" /* 2046 */;
2026-10-03 08:58:59 +00:00
import react from "react" /* 19 */;
2026-10-09 10:00:15 +00:00
import UserSettingsProtoStore from "UserSettingsProtoStore" /* 1244 */;
2026-10-03 08:58:59 +00:00
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-10-03 08:58:59 +00:00
const require = globalThis.__r;
let _require;
2026-07-20 16:05:17 +00:00
2026-10-08 09:57:35 +00:00
const tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useFrecencySettings(arg0) {
2026-10-03 08:58:59 +00:00
let closure_0;
let tmp5;
let tmp6;
let tmp8;
let tmp9;
let tmp = _require;
const obj = require("react");
const cResult = obj.c(5);
_require = tmp4;
if (cResult[0] !== (undefined === arg0 || arg0)) {
const fn = function n() {
const tmp = closure_0;
if (tmp) {
const FrecencyUserSettingsActionCreators = UserSettingsProtoActionCreators.FrecencyUserSettingsActionCreators;
const ifNecessary = FrecencyUserSettingsActionCreators.loadIfNecessary();
}
};
const items = [undefined === arg0 || arg0];
cResult[0] = undefined === arg0 || arg0;
cResult[1] = fn;
cResult[2] = items;
tmp6 = items;
tmp5 = fn;
} else {
tmp5 = cResult[1];
tmp6 = cResult[2];
}
const effect = react.useEffect(tmp5, tmp6);
if (cResult[3] === Symbol.for("react.memo_cache_sentinel")) {
const items1 = [UserSettingsProtoStore];
const fn2 = function f() {
return UserSettingsProtoStore.frecencyWithoutFetchingLatest;
};
cResult[3] = items1;
cResult[4] = fn2;
tmp9 = fn2;
tmp8 = items1;
} else {
tmp8 = cResult[3];
tmp9 = cResult[4];
}
const tmpResult = tmp(504);
return tmpResult.useStateFromStores(tmp8, tmp9);
2026-10-08 09:57:35 +00:00
}) : (function useFrecencySettings() {
2026-10-03 08:58:59 +00:00
let flag = arg0;
if (arg0 === undefined) {
2026-08-08 06:10:11 +00:00
flag = true;
}
const items = [flag];
2026-10-03 08:58:59 +00:00
const effect = react.useEffect(() => {
const tmp = flag;
if (tmp) {
const FrecencyUserSettingsActionCreators = UserSettingsProtoActionCreators.FrecencyUserSettingsActionCreators;
2026-08-08 06:10:11 +00:00
const ifNecessary = FrecencyUserSettingsActionCreators.loadIfNecessary();
}
}, items);
const items1 = [UserSettingsProtoStore];
2026-10-03 08:58:59 +00:00
const obj = flag(504);
return obj.useStateFromStores(items1, () => UserSettingsProtoStore.frecencyWithoutFetchingLatest);
});
const result = size.fileFinishedImporting("modules/user_settings/FrecencyUserSettingsHooks.tsx");
export const useFrecencySettings = tmp2;