82 lines
4.5 KiB
TypeScript
82 lines
4.5 KiB
TypeScript
/* Metro module 6777; source: modules/applications/useGetOrFetchApplications.tsx; dependencies: [31, 4234, 628, 6772, 22, 1360, 566, 2] */
|
|
import ApplicationStore from './ApplicationStore.tsx'; /* Metro dependency 4234 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
|
|
function _fun53390(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6955:6, offset: 0x0134787f, size: 150 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const useGetOrFetchApplications2 = useGetOrFetchApplications;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/applications/useGetOrFetchApplications.tsx');
|
|
exports.default = useGetOrFetchApplications2;
|
|
exports.useGetOrFetchApplication = useGetOrFetchApplication;
|
|
function useGetOrFetchApplications(a0) { // fn#53391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6955:116, offset: 0x01347915, size: 136 bytes, params: 2, frame: 17
|
|
const value = a1;
|
|
const env0_0 = a0;
|
|
const r2 = !(value !== undefined) || value;
|
|
const env0_2 = ReactModule.useRef([]);
|
|
ReactModule.useEffect(_fun53392, [a0, r2]);
|
|
return (FluxModule).useStateFromStoresArray([ApplicationStore], _fun53393);
|
|
function _fun53392() { // fn#53392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6955:198, offset: 0x0134799d, size: 191 bytes, params: 1, frame: 19
|
|
var r1;
|
|
var value2;
|
|
var moduleValue;
|
|
var value4;
|
|
var defaultImport;
|
|
var fetchApplications;
|
|
var defaultImport2;
|
|
var value5;
|
|
let binding = env0_1;
|
|
if (binding) {
|
|
value2 = environment.__proto__;
|
|
moduleValue = require(628) /* metro dependency 628: shallowEqual */;
|
|
r1 = !moduleValue.areArraysShallowEqual(env0_0, env0_2.current);
|
|
} else {
|
|
r1 = binding;
|
|
}
|
|
if (r1) {
|
|
value4 = environment.__proto__;
|
|
defaultImport = importDefault(6772) /* metro dependency 6772: ApplicationActionCreators */;
|
|
fetchApplications = defaultImport.fetchApplications;
|
|
defaultImport2 = importDefault(22) /* metro dependency 22 */;
|
|
binding = env0_0;
|
|
value5 = defaultImport2(binding);
|
|
Reflect.apply(fetchApplications, defaultImport,
|
|
[value5.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).uniq().value(),
|
|
false]);
|
|
env0_2.current = binding;
|
|
}
|
|
}
|
|
|
|
function _fun53393() { // fn#53393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6955:396, offset: 0x01347a5c, size: 26 bytes, params: 1, frame: 11
|
|
return env0_0.map(_fun53394);
|
|
function _fun53394(a0) { // fn#53394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6955:407, offset: 0x01347a76, size: 34 bytes, params: 2, frame: 12
|
|
var r0;
|
|
let value = undefined;
|
|
if (a0 != null) {
|
|
value = environment.__proto__.__proto__;
|
|
value = ApplicationStore.getApplication(a0);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function useGetOrFetchApplication(a0) { // fn#53395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6955:596, offset: 0x01347a98, size: 58 bytes, params: 2, frame: 15
|
|
let value = a1;
|
|
value = useGetOrFetchApplications(a0 != null ? [a0] : [], !(value !== undefined) || value);
|
|
return value[0];
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun53390, 6777, [31, 4234, 628, 6772, 22, 1360, 566,
|
|
2]) /* metro module 6777, dependencies: [31, 4234, 628, 6772, 22, 1360, 566, 2] */;
|