decord/source/modules/video_backgrounds/LastUsedVideoBackgroundOption.tsx
github-actions cd74c1f217 chore: update source for alpha 345.5
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9667_m.js (378 MB)
2026-09-05 10:56:28 +00:00

75 lines
2.9 KiB
TypeScript

// Module ID: 9100
// Function ID: 9101
// Name: getLastUsedVideoBackgroundOption
// Dependencies: [19, 1221, 1371, 9097, 4218, 504, 2]
// Exports: getLastUsedVideoBackgroundOption, useLastUsedVideoBackgroundOption
// Module 9100 (getLastUsedVideoBackgroundOption)
import getPremiumPlanItemDefault from "getPremiumPlanItem" /* 4218 */;
import isAnimatedBackgroundOption from "isAnimatedBackgroundOption" /* 9097 */;
import closure_3 from "noop" /* 19 */;
import closure_4 from "handleConnectionClosedOrResumed" /* 1221 */;
import closure_5 from "mergeGuildAvatar" /* 1371 */;
require = arg1;
const result = require("set").fileFinishedImporting("modules/video_backgrounds/LastUsedVideoBackgroundOption.tsx");
export const getLastUsedVideoBackgroundOption = function getLastUsedVideoBackgroundOption(currentUser) {
const voiceAndVideo = settings.settings.voiceAndVideo;
let prop;
if (voiceAndVideo != null) {
prop = voiceAndVideo.videoBackgroundFilterDesktop;
}
const videoBackgroundOptionFromProto = isAnimatedBackgroundOption.getVideoBackgroundOptionFromProto(prop, currentUser.id);
const obj = isAnimatedBackgroundOption;
const tmp2 = require;
if (!obj2.isCustomBackgroundOption(videoBackgroundOptionFromProto)) {
if (typeof videoBackgroundOptionFromProto !== "number") {
let tmp7 = videoBackgroundOptionFromProto;
} else {
tmp7 = null;
const tmp2Result = isAnimatedBackgroundOption;
}
let tmp6 = tmp7;
} else {
tmp6 = null;
const obj3 = getPremiumPlanItemDefault;
}
return tmp6;
};
export const useLastUsedVideoBackgroundOption = function useLastUsedVideoBackgroundOption() {
const items = [closure_4];
const stateFromStores = stateFromStores1(504).useStateFromStores(items, () => settings.settings);
let obj = stateFromStores1(504);
const items1 = [closure_5];
stateFromStores1 = stateFromStores1(504).useStateFromStores(items1, () => currentUser.getCurrentUser());
const voiceAndVideo = stateFromStores.voiceAndVideo;
let prop;
if (voiceAndVideo != null) {
prop = voiceAndVideo.videoBackgroundFilterDesktop;
}
const items2 = [prop, stateFromStores1];
return React.useMemo(() => {
let tmp2 = null;
if (null != stateFromStores1) {
const videoBackgroundOptionFromProto = stateFromStores1(closure_1_2[3]).getVideoBackgroundOptionFromProto(prop, tmp.id);
const obj = stateFromStores1(closure_1_2[3]);
const tmp4 = stateFromStores1;
if (!obj2.isCustomBackgroundOption(videoBackgroundOptionFromProto)) {
if (typeof videoBackgroundOptionFromProto !== "number") {
let tmp9 = videoBackgroundOptionFromProto;
} else {
tmp9 = null;
const tmp4Result = tmp4(tmp5[3]);
}
let tmp8 = tmp9;
} else {
tmp8 = null;
const obj3 = prop(tmp5[4]);
}
tmp2 = tmp8;
obj2 = stateFromStores1(closure_1_2[3]);
}
return tmp2;
}, items2);
};