decord/source/modules/video_backgrounds/LastUsedVideoBackgroundOption.tsx

74 lines
2.8 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 9059
// Function ID: 9060
2026-07-29 08:29:29 +00:00
// Name: getLastUsedVideoBackgroundOption
2026-08-05 07:35:12 +00:00
// Dependencies: [19, 1340, 1874, 9056, 3901, 589, 2]
2026-07-20 16:05:17 +00:00
// Exports: getLastUsedVideoBackgroundOption, useLastUsedVideoBackgroundOption
2026-08-05 07:35:12 +00:00
// Module 9059 (getLastUsedVideoBackgroundOption)
2026-07-29 08:29:29 +00:00
import noop from "noop";
import handleConnectionClosedOrResumed from "handleConnectionClosedOrResumed";
import mergeGuildAvatar from "mergeGuildAvatar";
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
const result = require("mergeGuildAvatar").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;
}
2026-08-05 07:35:12 +00:00
const videoBackgroundOptionFromProto = require(9056) /* isAnimatedBackgroundOption */.getVideoBackgroundOptionFromProto(prop, currentUser.id);
const obj = require(9056) /* isAnimatedBackgroundOption */;
2026-07-29 08:29:29 +00:00
const tmp2 = require;
2026-07-20 16:05:17 +00:00
if (!obj2.isCustomBackgroundOption(videoBackgroundOptionFromProto)) {
2026-08-04 21:03:28 +00:00
if (typeof videoBackgroundOptionFromProto !== "number") {
2026-07-20 16:05:17 +00:00
let tmp7 = videoBackgroundOptionFromProto;
} else {
tmp7 = null;
2026-08-05 07:35:12 +00:00
const tmp2Result = tmp2(9056);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp6 = tmp7;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp6 = null;
2026-08-05 07:35:12 +00:00
const obj3 = importDefault(3901);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp6;
2026-07-20 16:05:17 +00:00
};
export const useLastUsedVideoBackgroundOption = function useLastUsedVideoBackgroundOption() {
2026-07-29 08:29:29 +00:00
const items = [handleConnectionClosedOrResumed];
const stateFromStores = stateFromStores1(589).useStateFromStores(items, () => settings.settings);
let obj = stateFromStores1(589);
const items1 = [mergeGuildAvatar];
stateFromStores1 = stateFromStores1(589).useStateFromStores(items1, () => currentUser.getCurrentUser());
2026-07-20 16:05:17 +00:00
const voiceAndVideo = stateFromStores.voiceAndVideo;
2026-07-29 08:29:29 +00:00
let prop;
if (voiceAndVideo != null) {
2026-07-20 16:05:17 +00:00
prop = voiceAndVideo.videoBackgroundFilterDesktop;
}
const items2 = [prop, stateFromStores1];
return React.useMemo(() => {
2026-07-29 08:29:29 +00:00
let tmp2 = null;
2026-07-20 16:05:17 +00:00
if (null != stateFromStores1) {
2026-07-29 08:29:29 +00:00
const videoBackgroundOptionFromProto = stateFromStores1(outer1_2[3]).getVideoBackgroundOptionFromProto(prop, tmp.id);
const obj = stateFromStores1(outer1_2[3]);
const tmp4 = stateFromStores1;
if (!obj2.isCustomBackgroundOption(videoBackgroundOptionFromProto)) {
2026-08-04 21:03:28 +00:00
if (typeof videoBackgroundOptionFromProto !== "number") {
2026-07-29 08:29:29 +00:00
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(outer1_2[3]);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp2;
2026-07-20 16:05:17 +00:00
}, items2);
};