70 lines
4.6 KiB
TypeScript
70 lines
4.6 KiB
TypeScript
/* Metro module 15424; source: modules/soundboard/native/SoundboardHooks.tsx; dependencies: [5, 31, 4502, 1310, 15418, 6276, 1478, 566, 4002, 1362, 6944, 2] */
|
|
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import ThemeStore from '../../user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */
|
|
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
|
|
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 ActionSheetConstantsModule from '../../action_sheet/native/ActionSheetConstants.tsx'; /* Metro dependency 6276 */
|
|
import * as SoundboardStyleConstantsModule from './SoundboardStyleConstants.tsx'; /* Metro dependency 15418 */
|
|
|
|
function _fun118012(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15621:6, offset: 0x024c8c53, size: 236 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/soundboard/native/SoundboardHooks.tsx');
|
|
exports.useSoundButtonStyleConfig = function() {
|
|
var width = importDefault(dependencyMap[6])().width;
|
|
var object = {};
|
|
var Math = global.Math;
|
|
object.buttonWidth = (Math.min(ACTION_SHEET_MAX_WIDTH, width) - SOUND_ROW_PADDING) / SOUNDS_PER_ROW;
|
|
return object;
|
|
};
|
|
exports.useMaybeFetchSoundboardSounds = useMaybeFetchSoundboardSounds;
|
|
function useMaybeFetchSoundboardSounds({shouldFetch}) { // fn#118014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15621:428, offset: 0x024c8d91, size: 149 bytes, params: 2, frame: 20
|
|
ReactModule.useEffect(function() {
|
|
_fun118018()();
|
|
}, [(require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
|
|
return AccessibilityStore.saturation;
|
|
}), (require(566) /* metro dependency 566: flux */).useStateFromStores([ThemeStore], function() {
|
|
return require(dependencyMap[8]).isThemeDark(ThemeStore.theme);
|
|
}), shouldFetch]);
|
|
function _fun118017() { // fn#118017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15621:587, offset: 0x024c8e56, size: 21 bytes, params: 1, frame: 9
|
|
_fun118018()();
|
|
function _fun118018() { // fn#118018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15621:598, offset: 0x024c8e6b, size: 36 bytes, params: 1, frame: 12
|
|
const env0_0 = env2_3(_fun118020);
|
|
return _fun118021;
|
|
function* _fun118020() { // fn#118020, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15621:618, offset: 0x024c8e9a, size: 101 bytes, params: 1, frame: 14
|
|
var binding;
|
|
var binding2;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__.__proto__;
|
|
if (require) {
|
|
value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
binding = env4_0;
|
|
binding2 = env4_2;
|
|
binding(binding2[9]).FrecencyUserSettingsActionCreators.loadIfNecessary();
|
|
value = binding(binding2[10]);
|
|
yield value.maybeFetchSoundboardSounds();
|
|
value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun118021() { // fn#118021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15621:750, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
|
|
return env0_0.apply(this, arguments);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun118012, 15424, [5, 31, 4502, 1310, 15418, 6276, 1478, 566, 4002, 1362, 6944,
|
|
2]) /* metro module 15424, dependencies: [5, 31, 4502, 1310, 15418, 6276, 1478, 566, 4002, 1362, 6944, 2] */;
|