Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,8 @@
|
||||
/* Metro module 10735; source: modules/connectivity/native/ConnectivityConstants.tsx; dependencies: [2] */
|
||||
function _fun82464(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10921:6, offset: 0x01ef7de3, size: 81 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/connectivity/native/ConnectivityConstants.tsx');
|
||||
exports.RTC_PANEL_HEIGHT = 28;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,305 @@
|
||||
/* Metro module 7554; source: modules/connectivity/native/ConnectivityIndicatorStateStore.tsx; dependencies: [6, 7, 15, 17, 18, 4885, 1226, 4814, 1934, 7030, 661, 3, 7555, 1458, 566, 694, 2] */
|
||||
function _fun60739(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7732:6, offset: 0x0170d5ee, size: 680 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const closure = function() {
|
||||
env0_22 = false;
|
||||
updateState_60746();
|
||||
return false;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
||||
const cacheStore = importDefault(4885) /* metro dependency 4885: CacheStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const appStateStore = importDefault(7030) /* metro dependency 7030: AppStateStore */;
|
||||
const env0_12 = (require(661) /* metro dependency 661: Constants */).AppStates;
|
||||
let value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('ConnectivityIndicatorStateStore');
|
||||
object2 = {HIDDEN: 'hidden', WAITING_FOR_NETWORK: 'waiting_for_network', NO_CONNECTION: 'no_connection',
|
||||
BACK_ONLINE: 'back_online'};
|
||||
const env0_15 = {UNKNOWN: 'unknown', ONLINE: 'online', OFFLINE: 'offline', CONNECTING: 'connecting'};
|
||||
const env0_18 = object2.HIDDEN;
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
_fun60753(Store).displayName = 'ConnectivityIndicatorStateStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
|
||||
env0_22 = true;
|
||||
updateState_60746();
|
||||
return false;
|
||||
}, CONNECTION_RESUMED: function() {
|
||||
env0_22 = true;
|
||||
updateState_60746();
|
||||
return false;
|
||||
}, CONNECTION_CLOSED: closure, CONNECTION_INTERRUPTED: closure});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/connectivity/native/ConnectivityIndicatorStateStore.tsx');
|
||||
exports.default = value;
|
||||
exports.ConnectivityIndicatorState = object2;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_60740() { // fn#60740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7732:219, offset: 0x0170d896, size: 94 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_60740_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function getShowWaitingForNetworkDelayMs() { // fn#60743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7732:823, offset: 0x0170d8f4, size: 100 bytes, params: 1, frame: 13
|
||||
var r0;
|
||||
var timeoutMs;
|
||||
var value;
|
||||
if (CacheStore.hasCache()) {
|
||||
value = importDefault(7555) /* metro dependency 7555: ConnectionIndicatorExperiment */;
|
||||
timeoutMs = value.getConfig({location: 'ConnectivityIndicatorStateStore'}).timeoutMs;
|
||||
value = 10000;
|
||||
r0 = timeoutMs ?? value;
|
||||
} else {
|
||||
r0 = env0_17;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function nextState(a0) { // fn#60744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7732:1033, offset: 0x0170d958, size: 773 bytes, params: 2, frame: 13
|
||||
var object;
|
||||
var object2;
|
||||
if (env0_24) {
|
||||
return {immediate: env0_14.HIDDEN};
|
||||
}
|
||||
const state = AppStateStore.getState();
|
||||
const BACKGROUND = AppStates.BACKGROUND;
|
||||
if (state === BACKGROUND) {
|
||||
return {immediate: env0_14.HIDDEN};
|
||||
}
|
||||
const r2 = env0_21 == null || env0_20 == null ? env0_15.UNKNOWN : env0_21 ? env0_15.OFFLINE : env0_20 ? env0_22 ? env0_23 ? env0_15.CONNECTING : env0_15.ONLINE : env0_15.CONNECTING : env0_15.ONLINE;
|
||||
const HIDDEN = env0_14.HIDDEN;
|
||||
if (HIDDEN === a0) {
|
||||
if (env0_15.OFFLINE === r2) {
|
||||
return {delayed: {state: env0_14.NO_CONNECTION, delayMs: env0_17}};
|
||||
}
|
||||
if (env0_15.CONNECTING === r2) {
|
||||
object2 = {};
|
||||
object2.state = env0_14.WAITING_FOR_NETWORK;
|
||||
object2.delayMs = getShowWaitingForNetworkDelayMs();
|
||||
return {delayed: object2};
|
||||
}
|
||||
if (env0_15.ONLINE !== r2) {
|
||||
env0_15.UNKNOWN;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
const BACK_ONLINE = env0_14.BACK_ONLINE;
|
||||
if (BACK_ONLINE === a0) {
|
||||
if (env0_15.OFFLINE === r2) {
|
||||
return {delayed: {state: env0_14.NO_CONNECTION, delayMs: env0_17}};
|
||||
}
|
||||
if (env0_15.CONNECTING === r2) {
|
||||
object = {};
|
||||
object.state = env0_14.WAITING_FOR_NETWORK;
|
||||
object.delayMs = getShowWaitingForNetworkDelayMs();
|
||||
return {delayed: object};
|
||||
}
|
||||
if (env0_15.ONLINE === r2) {
|
||||
return {delayed: {state: env0_14.HIDDEN, delayMs: env0_16}};
|
||||
}
|
||||
if (env0_15.UNKNOWN === r2) {
|
||||
return {delayed: {state: env0_14.HIDDEN, delayMs: env0_16}};
|
||||
}
|
||||
return {};
|
||||
}
|
||||
const WAITING_FOR_NETWORK = env0_14.WAITING_FOR_NETWORK;
|
||||
if (WAITING_FOR_NETWORK === a0) {
|
||||
if (env0_15.OFFLINE === r2) {
|
||||
return {immediate: env0_14.NO_CONNECTION};
|
||||
}
|
||||
if (env0_15.ONLINE === r2) {
|
||||
return {immediate: env0_14.BACK_ONLINE, delayed: {state: env0_14.HIDDEN, delayMs: env0_16}};
|
||||
}
|
||||
if (env0_15.CONNECTING !== r2) {
|
||||
env0_15.UNKNOWN;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
const NO_CONNECTION = env0_14.NO_CONNECTION;
|
||||
if (NO_CONNECTION === a0) {
|
||||
if (env0_15.CONNECTING === r2) {
|
||||
return {immediate: env0_14.WAITING_FOR_NETWORK};
|
||||
}
|
||||
if (env0_15.ONLINE === r2) {
|
||||
return {immediate: env0_14.BACK_ONLINE, delayed: {state: env0_14.HIDDEN, delayMs: env0_16}};
|
||||
}
|
||||
if (env0_15.OFFLINE !== r2) {
|
||||
env0_15.UNKNOWN;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
function clearPendingDelayed() { // fn#60745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7732:2182, offset: 0x0170dc5d, size: 65 bytes, params: 1, frame: 13
|
||||
if (env0_26 != null) {
|
||||
env0_13.verbose('clearing pending state update timer');
|
||||
global.clearTimeout(env0_26);
|
||||
}
|
||||
}
|
||||
|
||||
function updateState_60746() { // fn#60746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7732:2303, offset: 0x0170dc9e, size: 290 bytes, params: 1, frame: 22
|
||||
var binding;
|
||||
var state;
|
||||
var delayMs;
|
||||
const value2 = nextState(HIDDEN);
|
||||
let immediate = value2.immediate;
|
||||
if (immediate != null) {
|
||||
immediate = value2.immediate;
|
||||
if (env0_19 !== null && env0_19 === HIDDEN) {
|
||||
clearPendingDelayed();
|
||||
}
|
||||
if (HIDDEN !== HIDDEN) {
|
||||
binding = env0_13;
|
||||
binding.verbose('state changed immediately from ' + HIDDEN + ' to ' + HIDDEN);
|
||||
binding = env0_28;
|
||||
if (binding != null) {
|
||||
binding.emitChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
let delayed = value2.delayed;
|
||||
if (delayed != null) {
|
||||
delayed = value2.delayed;
|
||||
state = delayed.state;
|
||||
delayMs = delayed.delayMs;
|
||||
if (env0_19 !== state) {
|
||||
if (env0_26 != null) {
|
||||
env0_13.verbose("clearing existing state update timer because we're scheduling a new one");
|
||||
global.clearTimeout(env0_26);
|
||||
}
|
||||
env0_26 = global.setTimeout(_fun60747, delayMs);
|
||||
return undefined;
|
||||
}
|
||||
if (env0_26 != null) {
|
||||
return undefined;
|
||||
}
|
||||
if (env0_26 != null) {
|
||||
env0_13.verbose("clearing existing state update timer because we're scheduling a new one");
|
||||
global.clearTimeout(env0_26);
|
||||
}
|
||||
env0_26 = global.setTimeout(_fun60747, delayMs);
|
||||
} else {
|
||||
clearPendingDelayed();
|
||||
}
|
||||
}
|
||||
|
||||
function handleLoadingMessagesChanged() { // fn#60749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7732:2956, offset: 0x0170de3e, size: 70 bytes, params: 1, frame: 12
|
||||
const channelId = SelectedChannelStore.getChannelId();
|
||||
if (channelId != null) {
|
||||
if (MessageStore.isLoadingMessages(channelId) !== env0_23) {
|
||||
updateState_60746();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function handleAuthStoreChanged() { // fn#60750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7732:3105, offset: 0x0170de84, size: 43 bytes, params: 1, frame: 10
|
||||
if (env0_20 !== AuthenticationStore.isAuthenticated()) {
|
||||
updateState_60746();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function handleAppStateUpdate_60751() { // fn#60751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7732:3202, offset: 0x0170deaf, size: 196 bytes, params: 1, frame: 15
|
||||
const state = AppStateStore.getState();
|
||||
const ACTIVE = AppStates.ACTIVE;
|
||||
if (ACTIVE === state) {
|
||||
if (env0_25 === AppStates.BACKGROUND) {
|
||||
if (env0_27 != null) {
|
||||
global.clearTimeout(env0_27);
|
||||
}
|
||||
env0_27 = global.setTimeout(function() {
|
||||
env1_24 = false;
|
||||
env1_27 = null;
|
||||
updateState_60746();
|
||||
}, 5000);
|
||||
}
|
||||
} else if (AppStates.BACKGROUND === state) {
|
||||
if (env0_27 != null) {
|
||||
global.clearTimeout(env0_27);
|
||||
}
|
||||
} else {
|
||||
AppStates.INACTIVE;
|
||||
}
|
||||
updateState_60746();
|
||||
return false;
|
||||
}
|
||||
|
||||
function _fun60753(a0) { // fn#60753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7732:3494, offset: 0x0170df8e, size: 91 bytes, params: 2, frame: 16
|
||||
const closure = ConnectivityIndicatorStateStore;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: 'initialize', value: value_60755}, {key: 'getState', value: function() {
|
||||
return HIDDEN;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function _fun60747() { // fn#60747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7732:2732, offset: 0x0170ddc0, size: 105 bytes, params: 1, frame: 19
|
||||
var binding;
|
||||
if (HIDDEN !== state) {
|
||||
binding = env1_13;
|
||||
binding.verbose('state changed after a delay from ' + HIDDEN + ' to ' + HIDDEN);
|
||||
binding = env1_28;
|
||||
if (binding != null) {
|
||||
binding.emitChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function ConnectivityIndicatorStateStore() { // fn#60754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7732:3506, offset: 0x0170dfe9, size: 113 bytes, params: 1, frame: 20
|
||||
const value = environment.__proto__;
|
||||
env1_2(this, ConnectivityIndicatorStateStore);
|
||||
const value3 = env1_5(ConnectivityIndicatorStateStore);
|
||||
return env1_4(this, _isNativeReflectConstruct_60740() ? global.Reflect.construct(value3, arguments,
|
||||
env1_5(this).constructor) : value3.apply(this, arguments));
|
||||
}
|
||||
|
||||
function value_60755() { // fn#60755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7732:3879, offset: 0x0170e05a, size: 242 bytes, params: 1, frame: 21
|
||||
this.waitFor(AuthenticationStore, CacheStore, MessageStore, SelectedChannelStore, AppStateStore);
|
||||
this.syncWith([MessageStore], handleLoadingMessagesChanged);
|
||||
this.syncWith([AuthenticationStore], handleAuthStoreChanged);
|
||||
this.syncWith([AppStateStore], handleAppStateUpdate_60751);
|
||||
(importDefault(1458) /* metro dependency 1458: NetworkUtils */).addOfflineCallback(function() {
|
||||
env2_21 = true;
|
||||
updateState_60746();
|
||||
});
|
||||
(importDefault(1458) /* metro dependency 1458: NetworkUtils */).addOnlineCallback(function() {
|
||||
env2_21 = false;
|
||||
updateState_60746();
|
||||
});
|
||||
const defaultImport3 = importDefault(1458) /* metro dependency 1458: NetworkUtils */;
|
||||
result = !defaultImport3.isOnline();
|
||||
env1_20 = AuthenticationStore.isAuthenticated();
|
||||
updateState_60746();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
/* Metro module 10739; source: modules/connectivity/native/components/GlobalStatusContent.tsx; dependencies: [31, 27, 1379, 1867, 4294, 4296, 10735, 661, 33, 4501, 697, 9325, 566, 10659, 10733, 4002, 4048, 8750, 4007, 7714, 477, 1585, 7725, 10740, 2] */
|
||||
function _fun82495(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10925:6, offset: 0x01ef88c7, size: 389 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
|
||||
const sessionsStore = importDefault(4296) /* metro dependency 4296: SessionsStore */;
|
||||
const RTC_PANEL_HEIGHT = (require(10735) /* metro dependency 10735: ConnectivityConstants */).RTC_PANEL_HEIGHT;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).RTCConnectionStates;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object2.bgNeutral = {backgroundColor: BACKGROUND_BASE_LOWEST};
|
||||
const GREEN_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360;
|
||||
object2.bg = {backgroundColor: GREEN_360};
|
||||
object2.container = {'paddingHorizontal': 16, 'minHeight': null, 'alignItems': 'center', 'justifyContent': 'center',
|
||||
minHeight: RTC_PANEL_HEIGHT};
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/connectivity/native/components/GlobalStatusContent.tsx');
|
||||
exports.default = _default_82496;
|
||||
}
|
||||
|
||||
function _default_82496() { // fn#82496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10925:491, offset: 0x01ef8a4c, size: 633 bytes, params: 1, frame: 29
|
||||
var r8;
|
||||
var r5;
|
||||
var moduleValue4;
|
||||
var value;
|
||||
const value2 = undefined;
|
||||
const styles = useStyles();
|
||||
const {guild, channel, rtcConnectionState,
|
||||
remotePlatform} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([RTCConnectionStore,
|
||||
GuildStore, ChannelStore, SessionsStore], _fun82497,
|
||||
[(importDefault(9325) /* metro dependency 9325: useVoiceStateForRemoteSession */)()]);
|
||||
const value5 = null;
|
||||
const r7 = value5 == channel ? value2 : channel.isGuildStageVoice();
|
||||
const value6 = (importDefault(10659) /* metro dependency 10659: useCanSpeakInChannel */)(value5 == channel ? value2 : channel.id);
|
||||
const value7 = (importDefault(10733) /* metro dependency 10733: useIsInvitedToSpeak */)();
|
||||
const value8 = value5 != channel;
|
||||
const isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark((importDefault(4048) /* metro dependency 4048: useTheme */)());
|
||||
const r4 = r7 ? value6 || value7 : value8;
|
||||
const value9 = (require(8750) /* metro dependency 8750: useIsScreenLandscapeNative */).useIsScreenLandscape();
|
||||
if (value9) {
|
||||
moduleValue4 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
||||
r8 = moduleValue4.isModalOpen(importDefault(7714) /* metro dependency 7714: ChannelCallModal */);
|
||||
} else {
|
||||
r8 = value9;
|
||||
}
|
||||
r8 = r8 && (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
|
||||
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
|
||||
const items2 = [r4 ? styles.bg : styles.bgNeutral];
|
||||
items2[1] = styles.container;
|
||||
items2[2] = {paddingTop: r8 ? 0 : top};
|
||||
r8 = r8 && ((Component) => <Component hidden />)(importDefault(7725) /* metro dependency 7725: StatusBarAndroid */);
|
||||
if (r7) {
|
||||
value = importDefault(10740) /* metro dependency 10740: GlobalStageChannelStatus */;
|
||||
value = ((Component) => <Component channel={channel} guild={guild} hasRTCConnectivity={value8} isDarkTheme={isThemeDark2} rtcConnectionState={rtcConnectionState} remotePlatform={remotePlatform} />)(value);
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = value5;
|
||||
}
|
||||
return (
|
||||
<View style={items2}>
|
||||
{r8}
|
||||
{r5}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun82497() { // fn#82497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10925:566, offset: 0x01ef8cc5, size: 252 bytes, params: 1, frame: 19
|
||||
const value = environment.__proto__;
|
||||
const value3 = undefined;
|
||||
const channel = ChannelStore.getChannel((env0_0 == null ? value3 : env0_0.channelId) ?? RTCConnectionStore.getChannelId());
|
||||
const guild = GuildStore.getGuild(env0_0 != null ? channel == null ? value3 : channel.getGuildId() : RTCConnectionStore.getGuildId());
|
||||
const sessionById = SessionsStore.getSessionById((env0_0 == null ? value3 : env0_0.sessionId) ?? '');
|
||||
const os = sessionById == null ? value3 : sessionById.clientInfo.os;
|
||||
const object2 = {guild: guild, channel: channel};
|
||||
object2.rtcConnectionState = env0_0 != null ? RTCConnectionStates.RTC_CONNECTED : RTCConnectionStore.getState();
|
||||
object2.remotePlatform = os;
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
/* Metro module 10737; source: modules/connectivity/native/components/GlobalStatusIndicator.tsx; dependencies: [31, 27, 3849, 4606, 10738, 1379, 4294, 33, 9325, 566, 10665, 7709, 1244, 10739, 4017, 10734, 2] */
|
||||
function _fun82468(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10923:6, offset: 0x01ef7f33, size: 350 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.View;
|
||||
const env0_5 = value.StyleSheet;
|
||||
const env0_6 = value.TouchableWithoutFeedback;
|
||||
const NativeEventEmitter = value.NativeEventEmitter;
|
||||
const NativeModules = value.NativeModules;
|
||||
const actionSheetStore = importDefault(3849) /* metro dependency 3849: ActionSheetStore */;
|
||||
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
|
||||
const nativeMenuStore = importDefault(10738) /* metro dependency 10738: NativeMenuStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_12 = value.jsx;
|
||||
const env0_13 = value.Fragment;
|
||||
const env0_14 = value.jsxs;
|
||||
const DCDStatusBarOverlayViewManager = NativeModules.DCDStatusBarOverlayViewManager;
|
||||
const nativeEventEmitter = new NativeEventEmitter(DCDStatusBarOverlayViewManager);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/connectivity/native/components/GlobalStatusIndicator.tsx');
|
||||
exports.default = _default_82477;
|
||||
exports.useGlobalStatusIndicatorHeightSharedValue = useGlobalStatusIndicatorHeightSharedValue;
|
||||
}
|
||||
|
||||
function GlobalStatusIndicatorWrapper({onPress}) { // fn#82469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10923:371, offset: 0x01ef8091, size: 476 bytes, params: 2, frame: 22
|
||||
var r5;
|
||||
var intl;
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore], _fun82470,
|
||||
[(importDefault(9325) /* metro dependency 9325: useVoiceStateForRemoteSession */)()]);
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun82471,
|
||||
[value4]);
|
||||
const env0_3 = value5;
|
||||
const openVoice = (require(10665) /* metro dependency 10665: VoiceChatModalContext */).useVoiceChatNavigationContext()?.openVoice;
|
||||
const binding = env0_3;
|
||||
const value7 = binding.useCallback(_fun82472, [value5, onPress, openVoice]);
|
||||
const env0_6 = binding.useRef(value7);
|
||||
binding.useEffect(_fun82473);
|
||||
binding.useEffect(_fun82474, [value4]);
|
||||
const r8 = value5 != null ? 'button' : 'text';
|
||||
if (value5 != null) {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r5 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.GaCMgX);
|
||||
} else {
|
||||
r5 = undefined;
|
||||
}
|
||||
return (
|
||||
<TouchableWithoutFeedback
|
||||
accessibilityRole={r8}
|
||||
accessibilityHint={r5}
|
||||
onPress={value7}
|
||||
>
|
||||
<View>
|
||||
{((Component) => <Component />)(importDefault(10739) /* metro dependency 10739: GlobalStatusContent */)}
|
||||
</View>
|
||||
</TouchableWithoutFeedback>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_82477({children, showWhenParticipantOnScreen, forceHide, onPress}) { // fn#82477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10923:1145, offset: 0x01ef8385, size: 270 bytes, params: 2, frame: 23
|
||||
showWhenParticipantOnScreen = !(showWhenParticipantOnScreen === undefined) && showWhenParticipantOnScreen;
|
||||
forceHide = !(forceHide === undefined) && forceHide;
|
||||
const value2 = (require(10734) /* metro dependency 10734: useGlobalStatusIndicatorState */).useGlobalStatusIndicatorState(showWhenParticipantOnScreen);
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ActionSheetStore], _fun82478);
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([NativeMenuStore], function() {
|
||||
return NativeMenuStore.isOpen();
|
||||
});
|
||||
const height = value2.height;
|
||||
return height.useMemo(_fun82480, [children, value3 || value4, value2.isVisible && !forceHide, onPress, height,
|
||||
forceHide]);
|
||||
}
|
||||
|
||||
function useGlobalStatusIndicatorHeightSharedValue(a0) { // fn#82481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10923:1850, offset: 0x01ef8575, size: 95 bytes, params: 2, frame: 15
|
||||
const env0_0 = a0;
|
||||
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(a0.height);
|
||||
env0_3.useEffect(_fun82482, [a0.height, value2]);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun82470() { // fn#82470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10923:439, offset: 0x01ef826d, size: 50 bytes, params: 1, frame: 11
|
||||
var r0;
|
||||
var value;
|
||||
const channelId = env0_1?.channelId;
|
||||
if (channelId != null) {
|
||||
r0 = channelId;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
value = RTCConnectionStore.getChannelId();
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun82472() { // fn#82472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10923:669, offset: 0x01ef829f, size: 132 bytes, params: 1, frame: 15
|
||||
var value2;
|
||||
var value3;
|
||||
if (env0_3 != null) {
|
||||
if (openVoice == null) {
|
||||
value3 = environment.__proto__;
|
||||
(require(7709) /* metro dependency 7709: PrivateChannelCallUtils */).navigateToVoiceChannel(env0_3,
|
||||
'RTC Panel');
|
||||
} else {
|
||||
value2 = environment.__proto__;
|
||||
if (ChannelRTCStore.getChatOpen(env0_3.id)) {
|
||||
openVoice();
|
||||
} else {
|
||||
value3 = environment.__proto__;
|
||||
(require(7709) /* metro dependency 7709: PrivateChannelCallUtils */).navigateToVoiceChannel(env0_3,
|
||||
'RTC Panel');
|
||||
}
|
||||
}
|
||||
if (onPress != null) {
|
||||
onPress();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun82474() { // fn#82474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10923:856, offset: 0x01ef8323, size: 47 bytes, params: 1, frame: 14
|
||||
const env0_0 = env1_15.addListener('StatusBarTapped', _fun82475);
|
||||
return _fun82476;
|
||||
}
|
||||
|
||||
function _fun82478() { // fn#82478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10923:1302, offset: 0x01ef8493, size: 25 bytes, params: 1, frame: 9
|
||||
const value = environment.__proto__;
|
||||
return ActionSheetStore.getContent() != null;
|
||||
}
|
||||
|
||||
function _fun82480() { // fn#82480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10923:1434, offset: 0x01ef84bf, size: 182 bytes, params: 1, frame: 22
|
||||
const value = environment.__proto__;
|
||||
return (
|
||||
<>
|
||||
<View
|
||||
importantForAccessibility={env0_5 ? 'no-hide-descendants' : undefined}
|
||||
accessibilityElementsHidden={env0_5}
|
||||
style={[StyleSheet.absoluteFill, {marginTop: forceHide ? 0 : height, overflow: 'hidden'}]}
|
||||
>
|
||||
{children}
|
||||
</View>
|
||||
{env0_4 ? <GlobalStatusIndicatorWrapper onPress={onPress} /> : null}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun82482() { // fn#82482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10923:1964, offset: 0x01ef85d4, size: 30 bytes, params: 1, frame: 11
|
||||
const binding = env0_1;
|
||||
binding.set(env0_0.height);
|
||||
}
|
||||
|
||||
function _fun82475() { // fn#82475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10923:900, offset: 0x01ef8352, size: 20 bytes, params: 1, frame: 9
|
||||
env1_6.current();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/* Metro module 10734; source: modules/connectivity/native/useGlobalStatusIndicatorState.tsx; dependencies: [1379, 4294, 10735, 661, 7734, 9325, 566, 10733, 10731, 4007, 7709, 7713, 10736, 2] */
|
||||
function _fun82460(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10920:6, offset: 0x01ef7acf, size: 178 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
|
||||
const env0_5 = (require(10735) /* metro dependency 10735: ConnectivityConstants */).RTC_PANEL_HEIGHT;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).EMPTY_STRING_SNOWFLAKE_ID;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/connectivity/native/useGlobalStatusIndicatorState.tsx');
|
||||
exports.useGlobalStatusIndicatorState = useGlobalStatusIndicatorState;
|
||||
}
|
||||
|
||||
function useGlobalStatusIndicatorState() { // fn#82461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10920:307, offset: 0x01ef7b81, size: 534 bytes, params: 1, frame: 25
|
||||
var object2;
|
||||
var r10;
|
||||
var r6;
|
||||
var moduleValue6;
|
||||
const value = a0;
|
||||
let r1 = value !== undefined ? value : false;
|
||||
const value2 = (require(7734) /* metro dependency 7734: usePipVideoOrStream */).useHasPipParticipant({isActivityViewFocused: false});
|
||||
const value3 = (importDefault(9325) /* metro dependency 9325: useVoiceStateForRemoteSession */)();
|
||||
const channelId = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore],
|
||||
function() {
|
||||
return RTCConnectionStore.getChannelId();
|
||||
});
|
||||
const value4 = (importDefault(10733) /* metro dependency 10733: useIsInvitedToSpeak */)();
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun82463,
|
||||
[channelId, value4]);
|
||||
const value6 = channelId != null;
|
||||
const value7 = (require(10731) /* metro dependency 10731: StageChannelHeightHooks */).useGetStageRTCPanelHeight(channelId);
|
||||
const value8 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).useOpenModalKey();
|
||||
const value9 = value3 != null;
|
||||
if (value9) {
|
||||
moduleValue6 = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
|
||||
r10 = moduleValue6.getVoiceChannelKey(value3.channelId ?? EMPTY_STRING_SNOWFLAKE_ID) !== value8;
|
||||
} else {
|
||||
r10 = value9;
|
||||
}
|
||||
object2 = {};
|
||||
object2.voicePanelEnabled = (require(7713) /* metro dependency 7713: VoicePanelUtilsNative */).useIsVoicePanelShowing();
|
||||
object2.isRemoteVisible = r10;
|
||||
object2.isVoiceChannelSelected = value6;
|
||||
object2.hasPipParticipant = value2;
|
||||
object2.showWhenParticipantOnScreen = r1;
|
||||
object2.isConnectedToStageChannel = (importDefault(10736) /* metro dependency 10736: useMyCurrentStageChannel */)() != null;
|
||||
object2.isInvitedToSpeak = value4;
|
||||
const voicePanelEnabled = object2.voicePanelEnabled;
|
||||
const isRemoteVisible = object2.isRemoteVisible;
|
||||
const isVoiceChannelSelected = object2.isVoiceChannelSelected;
|
||||
const hasPipParticipant = object2.hasPipParticipant;
|
||||
const showWhenParticipantOnScreen = object2.showWhenParticipantOnScreen;
|
||||
const isConnectedToStageChannel = object2.isConnectedToStageChannel;
|
||||
if (voicePanelEnabled) {
|
||||
r1 = voicePanelEnabled;
|
||||
} else {
|
||||
r6 = !isRemoteVisible && (isConnectedToStageChannel ? !object2.isInvitedToSpeak : !isConnectedToStageChannel);
|
||||
r6 = r6 && (isVoiceChannelSelected ? hasPipParticipant && !showWhenParticipantOnScreen : !isVoiceChannelSelected);
|
||||
r1 = r6;
|
||||
}
|
||||
const value16 = !r1;
|
||||
object2 = {height: r1 ? r1 ? 0 : RTC_PANEL_HEIGHT : value4 ? value7 : r1 ? 0 : RTC_PANEL_HEIGHT, isVisible: value16};
|
||||
r1 = (r1 ? value16 : value6) && !value5;
|
||||
object2.isCustomBackground = r1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun82463() { // fn#82463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10920:496, offset: 0x01ef7daa, size: 57 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
return ChannelStore.getChannel(channelId)?.isGuildStageVoice() && !env0_1;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user