55 lines
3.0 KiB
TypeScript
55 lines
3.0 KiB
TypeScript
/* Metro module 11335; source: modules/chat/native/useChatWidth.tsx; dependencies: [31, 4010, 4012, 11336, 11337, 2] */
|
|
function _fun86562(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11521:6, offset: 0x01f97c6d, size: 136 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importAll(31) /* metro dependency 31 */;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat/native/useChatWidth.tsx');
|
|
exports.default = useChatWidth;
|
|
exports.getChatWidth = getChatWidth;
|
|
}
|
|
|
|
function useChatWidth(a0) { // fn#86563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11521:186, offset: 0x01f97cf5, size: 149 bytes, params: 2, frame: 16
|
|
const value2 = env0_3.useContext(importDefault(11337) /* metro dependency 11337: ChatViewWidthContext */);
|
|
const isChatLockedOpen = (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatLockedOpen;
|
|
const width = (importDefault(4012) /* metro dependency 4012: useBaseAppContainerDimensions */)().width;
|
|
let value = require(11336) /* metro dependency 11336: useDrawerWidth */;
|
|
value = value.useDrawerWidth();
|
|
return value2 ?? (a0 == null ? isChatLockedOpen ? width - value : width : a0 !== 0 ? width : isChatLockedOpen ? width - value : width);
|
|
}
|
|
|
|
function getChatWidth(a0) { // fn#86564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11521:371, offset: 0x01f97d8a, size: 131 bytes, params: 2, frame: 15
|
|
var r1;
|
|
var r0;
|
|
var value;
|
|
const useChatLayoutModule = require(4010) /* metro dependency 4010: useChatLayout */;
|
|
const getChatLayout = useChatLayoutModule.getChatLayout;
|
|
const isChatLockedOpen = Reflect.apply(getChatLayout, useChatLayoutModule, []).isChatLockedOpen;
|
|
const useBaseAppContainerDimensionsModule = require(4012) /* metro dependency 4012: useBaseAppContainerDimensions */;
|
|
const getBaseAppContainerDimensions = useBaseAppContainerDimensionsModule.getBaseAppContainerDimensions;
|
|
const width = Reflect.apply(getBaseAppContainerDimensions, useBaseAppContainerDimensionsModule, []).width;
|
|
if (a0 == null) {
|
|
if (isChatLockedOpen) {
|
|
value = require(11336) /* metro dependency 11336: useDrawerWidth */;
|
|
value = width - value.getDrawerWidth();
|
|
r1 = value;
|
|
} else {
|
|
r1 = width;
|
|
}
|
|
r0 = r1;
|
|
} else if (a0 !== 0) {
|
|
r0 = width;
|
|
} else {
|
|
if (isChatLockedOpen) {
|
|
value = require(11336) /* metro dependency 11336: useDrawerWidth */;
|
|
value = width - value.getDrawerWidth();
|
|
r1 = value;
|
|
} else {
|
|
r1 = width;
|
|
}
|
|
r0 = r1;
|
|
}
|
|
return r0;
|
|
}
|
|
|