This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,92 @@
// Metro module 5706 (f5707).
import UserStore from "../../../stores/UserStore";
import { ViewNsfwCommands, ViewNsfwGuilds } from "../UserSettings";
import * as _AgeVerificationUtils from "../../age_assurance/AgeVerificationUtils";
import { useIsAgeVerified } from "../../age_assurance/AgeVerificationUtils";
import { useNSFWAllowed } from "./useNSFWAllowed";
import { useIsFeatureAgeGated, isFeatureAgeGated } from "../../regional_feature_config/RegionalFeatureConfigUtils";
import { AgeGatedFeature } from "../../../_bundle/Module5013";
export function resolveNsfwTogglesWithDefaults(a0, a1, a2, a3) {
const r3 = a1 ? !a3 : a1;
return r3 ? !r3 : a2 !== false && (a0 == null ? false : a0);
}
export function useViewNsfwCommandsOrDefault() {
let r4 = ViewNsfwCommands.useSetting();
const isAgeVerified = useIsAgeVerified();
const nSFWAllowed = useNSFWAllowed();
const r25 = useIsFeatureAgeGated(AgeGatedFeature.COMMANDS_TOGGLE) && !isAgeVerified;
let r26 = !r25;
if (!r25) {
let r28 = nSFWAllowed !== false;
if (r28) {
if (r4 == null) {
r4 = false;
}
r28 = r4;
}
r26 = r28;
}
return r26;
}
export function useViewNsfwGuildsOrDefault() {
let r4 = ViewNsfwGuilds.useSetting();
const isAgeVerified = useIsAgeVerified();
const nSFWAllowed = useNSFWAllowed();
const r25 = useIsFeatureAgeGated(AgeGatedFeature.COMMANDS_TOGGLE) && !isAgeVerified;
let r26 = !r25;
if (!r25) {
let r28 = nSFWAllowed !== false;
if (r28) {
if (r4 == null) {
r4 = false;
}
r28 = r4;
}
r26 = r28;
}
return r26;
}
export function getViewNsfwCommandsOrDefault() {
let r12 = ViewNsfwCommands.getSetting();
const isAgeVerified = _AgeVerificationUtils.isAgeVerified();
const currentUser = UserStore.getCurrentUser();
let r25 = isFeatureAgeGated(AgeGatedFeature.COMMANDS_TOGGLE);
const nsfwAllowed = currentUser?.nsfwAllowed;
if (r25) {
r25 = !isAgeVerified;
}
let r27 = !r25;
if (!r25) {
let r29 = nsfwAllowed !== false;
if (r29) {
if (r12 == null) {
r12 = false;
}
r29 = r12;
}
r27 = r29;
}
return r27;
}
export function getViewNsfwGuildsOrDefault() {
let r12 = ViewNsfwGuilds.getSetting();
const isAgeVerified = _AgeVerificationUtils.isAgeVerified();
const currentUser = UserStore.getCurrentUser();
let r25 = isFeatureAgeGated(AgeGatedFeature.COMMANDS_TOGGLE);
const nsfwAllowed = currentUser?.nsfwAllowed;
if (r25) {
r25 = !isAgeVerified;
}
let r27 = !r25;
if (!r25) {
let r29 = nsfwAllowed !== false;
if (r29) {
if (r12 == null) {
r12 = false;
}
r29 = r12;
}
r27 = r29;
}
return r27;
}
@@ -0,0 +1,8 @@
// Metro module 14671 (f14672).
import * as _RegionalFeatureConfigUtils from "../../regional_feature_config/RegionalFeatureConfigUtils";
import { AgeGatedFeature } from "../../../_bundle/Module5013";
import { shouldShowTiggerPawtect } from "../../age_assurance/AgeVerificationUtils";
export function shouldAgeVerifyForDMDefaultOff() {
const isFeatureAgeGated = _RegionalFeatureConfigUtils.isFeatureAgeGated(AgeGatedFeature.DM_PRIVACY_SETTINGS);
return shouldShowTiggerPawtect() && isFeatureAgeGated;
}
@@ -0,0 +1,24 @@
// Metro module 9058 (f9059).
import { createApexExperiment } from "../../experiments/apex/index";
const apexExperiment = createApexExperiment({
kind: "user",
name: "2025-10-friend-request-alerts-v2",
defaultConfig: {
enabled: false
},
variations: {
1: {
enabled: true
}
}
});
export function useIsFriendRequestAlertsV2Enabled(a0) {
return apexExperiment.useConfig({
location: a0
}).enabled;
}
export function isFriendRequestAlertsV2Enabled(a0) {
return apexExperiment.getConfig({
location: a0
}).enabled;
}
@@ -0,0 +1,43 @@
// Metro module 13849 (f13850).
import { useEffect, useCallback } from "react";
import { View } from "react-native";
import { SafetySettingsNoticeAction, SafetySettingsNoticeType } from "../../../safety_common/Constants";
import { useSensitiveContentFilterHelpArticle } from "../../../explicit_media_redaction/SensitiveMediaGoreRedactionSettingsUtils";
import { trackSafetySettingsNoticeAnalytics } from "../../../safety_common/SafetySettingsUtils";
import Linking from "../../../../lib/native/Linking";
import HelpdeskUtils from "../../../../utils/HelpdeskUtils";
import AgeVerificationActionCreators_native from "../../../age_assurance/AgeVerificationActionCreators.native";
import { AgeVerificationModalEntryPoint } from "../../../age_assurance/AgeVerificationAnalyticsUtils";
import Module712 from "../../../../_bundle/Module712";
import { HelpMessage, HelpMessageTypes } from "../../../../design/void/native";
import { Button } from "../../../../design/components/Button/native/Button.native";
import { intl, t } from "../../../../intl/index.native";
import { Text } from "../../../../design/components/Text/native/Text";
export default function AgeConfirmationNotice() {
let callback;
const sensitiveContentFilterHelpArticle = useSensitiveContentFilterHelpArticle();
useEffect(() => {
trackSafetySettingsNoticeAnalytics(SafetySettingsNoticeType.AGE_CONFIRMATION_NOTICE, SafetySettingsNoticeAction.VIEWED);
}, []);
callback = useCallback(() => {
Linking.openURL(HelpdeskUtils.getArticleURL(sensitiveContentFilterHelpArticle));
trackSafetySettingsNoticeAnalytics(SafetySettingsNoticeType.AGE_CONFIRMATION_NOTICE, SafetySettingsNoticeAction.LEARN_MORE);
}, [sensitiveContentFilterHelpArticle]);
const callback2 = useCallback(() => {
AgeVerificationActionCreators_native.showAgeVerificationGetStartedModal({
entryPoint: AgeVerificationModalEntryPoint.CONTENT_AND_SOCIAL_NOTICE
});
trackSafetySettingsNoticeAnalytics(SafetySettingsNoticeType.AGE_CONFIRMATION_NOTICE, SafetySettingsNoticeAction.CONFIRM_AGE);
}, []);
return <View style={{
marginBottom: Module712.space.PX_8
}}>
<HelpMessage messageType={HelpMessageTypes.INFO} borderRadius={Module712.radii.lg} button={<Button variant="secondary" size="sm" text={intl.string(t.FDSSia)} onPress={callback2} />}>
{intl.format(t.mFgsfg, {
hook: (a0) => <Text role="link" variant="text-sm/medium" color="text-link" onPress={callback}>
{a0}
</Text>
})}
</HelpMessage>
</View>;
};
@@ -0,0 +1,63 @@
// Metro module 13837 (f13838).
import UserStore from "../../../../stores/UserStore";
import RelationshipActionCreators from "../../../../actions/RelationshipActionCreators";
import useAnalyticsLocations from "../../../app_analytics/useAnalyticsLocations";
import { TableRow } from "../../../../design/components/TableRow/native/TableRow.native";
import { Avatar, AvatarSizes } from "../../../../design/void/native";
import { intl, t } from "../../../../intl/index.native";
import showUserProfileActionSheet from "../../../user_profile/native/showUserProfileActionSheet";
import { Button } from "../../../../design/components/Button/native/Button.native";
import { useStateFromStores } from "../../../../_bundle/Module589";
const BlockedUserRow = function BlockedUserRow(props) {
const userRecord = props.userRecord;
const analyticsLocations = useAnalyticsLocations().analyticsLocations;
const props2 = {
icon: <Avatar user={userRecord} guildId={void 0} size={AvatarSizes.REFRESH_MEDIUM_32} />,
label: null,
subLabel: null,
labelLineClamp: 1,
subLabelLineClamp: 1,
accessibilityRole: "button",
accessibilityActions: null,
onAccessibilityAction: null,
onPress: null,
trailing: null
};
let label = userRecord != null;
if (label) {
let globalName = userRecord.globalName;
if (globalName == null) {
globalName = userRecord.username;
}
label = globalName;
}
props2.label = label;
props2.subLabel = userRecord?.globalName != null ? userRecord?.username : void 0;
props2.accessibilityActions = [{
name: "unblock",
label: intl.string(t.XyHpKH)
}];
props2.onAccessibilityAction = function onAccessibilityAction(a0) {
if (a0.nativeEvent.actionName === "unblock") {
RelationshipActionCreators.unblockUser(userRecord.id, {
location: "blocked-users-list-mobile-v2"
});
return void 0;
}
};
props2.onPress = () => showUserProfileActionSheet({
userId: userRecord.id,
sourceAnalyticsLocations: analyticsLocations
});
props2.trailing = <Button size="sm" variant="secondary" text={intl.string(t["PR/xUz"])} onPress={() => {
RelationshipActionCreators.unblockUser(userRecord.id, {
location: "blocked-users-list-mobile-v2"
});
}} />;
return <TableRow {...props2} />;
};
export default function ConnectedBlockedUserRow(props) {
const userId = props.userId;
const stateFromStores = useStateFromStores([UserStore], () => UserStore.getUser(userId));
return stateFromStores != null ? <BlockedUserRow userRecord={stateFromStores} /> : null;
};
@@ -0,0 +1,49 @@
// Metro module 13832 (f13833).
import { ScrollView } from "react-native";
import RelationshipStore from "../../../../stores/RelationshipStore";
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
import Module712 from "../../../../_bundle/Module712";
import useAnalyticsLocations, { AnalyticsLocationProvider } from "../../../app_analytics/useAnalyticsLocations";
import AnalyticsLocation from "../../../app_analytics/AnalyticsLocation";
import { EmptyState } from "../../../../design/void/native";
import { Blocked } from "../../../../design/components/Illustration/native/redesign/generated/Blocked";
import { intl, t } from "../../../../intl/index.native";
import { SafeAreaPaddingView } from "../../../../components_native/common/SafeAreaView";
import { Text } from "../../../../design/components/Text/native/Text";
import { TableRowGroup } from "../../../../design/components/TableRow/native/TableRowGroup.native";
import BlockedUserRowV2 from "./BlockedUserRowV2";
import { useStateFromStoresArray } from "../../../../_bundle/Module589";
let useStyles;
const BlockedUsersList = function BlockedUsersList(props) {
const userIds = props.userIds;
const styles = useStyles();
const analyticsLocations = useAnalyticsLocations(AnalyticsLocation.BLOCKED_USERS).analyticsLocations;
return userIds.length === 0 ? <EmptyState Illustration={Blocked} body={intl.string(t.nnsFif)} /> : <AnalyticsLocationProvider value={analyticsLocations}>
<SafeAreaPaddingView bottom style={styles.list}>
<ScrollView>
<Text style={styles.sectionLabelStyle} variant="text-sm/semibold" color="text-default">
{intl.formatToPlainString(t["c+JVEB"], {
numberOfBlockedUsers: userIds.length
})}
</Text>
<TableRowGroup key={intl.string(t.PFOUKW)} hasIcons>
{userIds.map((a0) => <BlockedUserRowV2 key={a0} userId={a0} />)}
</TableRowGroup>
</ScrollView>
</SafeAreaPaddingView>
</AnalyticsLocationProvider>;
};
useStyles = createStyles({
list: {
flex: 1,
paddingTop: Module712.space.PX_8,
paddingHorizontal: Module712.space.PX_16
},
sectionLabelStyle: {
marginTop: Module712.space.PX_12,
marginBottom: Module712.space.PX_8
}
});
export default function ConnectedBlockedUsersList() {
return <BlockedUsersList userIds={useStateFromStoresArray([RelationshipStore], () => RelationshipStore.getBlockedIDs())} />;
};
@@ -0,0 +1,138 @@
// Metro module 14659 (f14660).
import { useMemo, useState } from "react";
import { ActivityIndicator, View } from "react-native";
import { MobileSetting } from "../../core/native/SettingsConstants";
import { HelpdeskArticles } from "../../../../Constants";
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
import Module712 from "../../../../_bundle/Module712";
import { intl, t } from "../../../../intl/index.native";
import HelpdeskUtils from "../../../../utils/HelpdeskUtils";
import { GUILD_SPECIFIC_SETTINGS } from "../../defs/native/SafetyGuildSettingGuildSelect";
import { handleOpenLearnMoreLink } from "../../../contact_sync/native/ContactSyncUtils";
import { useAllServersOptionSelected } from "../../privacy_and_safety/useUserSafetySettingsSelectedGuildId";
import { useSensitiveContentFilterHelpArticle } from "../../../explicit_media_redaction/SensitiveMediaGoreRedactionSettingsUtils";
import { createSegmentedControl, createList } from "../../../settings/native/renderer/SettingBuilders";
import SettingsScreenNotices, { SettingsScreen } from "../../privacy_and_safety/native/SettingsScreenNotices";
import SettingLayout from "../../../settings/native/renderer/SettingLayout";
import useAuthorizedSlayerApplications from "../../authorized_apps/useAuthorizedSlayerApplications";
import { Text } from "../../../../design/components/Text/native/Text";
import { HermesBuiltin } from "../../../../_hermes/prelude";
const useStyles = createStyles({
loadingIndicator: {
marginTop: Module712.space.PX_32
},
emptyContainer: {
flex: 1,
gap: Module712.space.PX_4,
marginTop: Module712.space.PX_24,
paddingHorizontal: Module712.space.PX_16
}
});
export default function ContentAndSocialSettings(props) {
let state;
const route = props.route;
state = void 0;
const memo = useMemo(() => [MobileSetting.CONTENT_AND_SOCIAL_DISCORD, MobileSetting.CONNECTED_GAMES], []);
[state, ,] = useState(() => (route == null ? void 0 : route.params?.tab) === MobileSetting.CONNECTED_GAMES ? 1 : 0);
return <SettingLayout node={useMemo(() => createSegmentedControl({
defaultIndex: state,
settings: memo
}), [state, memo])} />;
};
export function DiscordPermissionsPage() {
const allServersOptionSelected = useAllServersOptionSelected();
const sensitiveContentFilterHelpArticle = useSensitiveContentFilterHelpArticle();
const memo2 = useMemo(() => {
const r31 = [{
settings: [MobileSetting.SENSITIVE_CONTENT_FILTERS],
subLabel: intl.format(t.dliU4j, {
learnMoreLink: HelpdeskUtils.getArticleURL(sensitiveContentFilterHelpArticle)
})
}, {
settings: [MobileSetting.DIRECT_MESSAGE_SPAM_FILTER],
subLabel: intl.format(t.RvjRRI, {
appealLink: HelpdeskUtils.getArticleURL(HelpdeskArticles.SAFE_DIRECT_MESSAGING)
})
}, {
label: intl.string(t.MDqARb),
settings: [MobileSetting.DIRECT_MESSAGE_SAFETY_ALERTS],
subLabel: intl.format(t.lunaRv, {
learnMoreLink: HelpdeskUtils.getArticleURL(HelpdeskArticles.SAFETY_ALERTS)
})
}, {
label: intl.string(t.wCFGLE),
settings: [MobileSetting.ANDROID_VIEW_NSFW_DM_COMMANDS_V2],
subLabel: intl.string(t.R9fXyS)
}];
const r98 = [];
const r1 = HermesBuiltin.arraySpread(r98, r31, 0);
const r101 = [MobileSetting.SAFETY_GUILD_SETTING_GUILD_SELECT, MobileSetting.SAFETY_GUILD_SETTING_DIRECT_MESSAGES, MobileSetting.SAFETY_GUILD_SETTING_MESSAGE_REQUESTS];
HermesBuiltin.arraySpread(r98, [{
label: intl.string(t["6x5uWQ"]),
settings: [MobileSetting.ACTIVITY_PRIVACY_SHARE_MY_ACTIVITY]
}, {
settings: [MobileSetting.ACTIVITY_PRIVACY_DEFAULT_SHARING]
}, {
settings: [MobileSetting.NOTIFY_FRIENDS_ON_COME_ONLINE]
}, {
label: intl.string(t.MeYuqs),
settings: allServersOptionSelected ? r101 : [...r101, ...GUILD_SPECIFIC_SETTINGS]
}, {
label: intl.string(t.XlGG9c),
settings: [MobileSetting.SAFETY_SEND_FRIEND_REQUESTS_EVERYONE, MobileSetting.SAFETY_SEND_FRIEND_REQUESTS_MUTUAL_FRIENDS, MobileSetting.SAFETY_SEND_FRIEND_REQUESTS_MUTUAL_GUILDS]
}, {
settings: [MobileSetting.FRIEND_REQUEST_NOTES]
}, {
label: intl.string(t["3wRort"]),
settings: [MobileSetting.ACCOUNT_BLOCKED_USERS_V2, MobileSetting.ACCOUNT_IGNORED_USERS],
subLabel: intl.format(t["0aNQo9"], {
helpArticle: HelpdeskUtils.getArticleURL(HelpdeskArticles.STEALTH_REMEDIATION_FEATURE_GUIDE)
})
}, {
label: intl.string(t.bGSsnc),
settings: [MobileSetting.SYNC_CONTACTS, MobileSetting.SYNC_CONTACTS_NAME, MobileSetting.STAFF_ONLY_FIND_YOUR_FRIENDS_DELETION],
subLabel: intl.format(t["TWz/S+"], {
onClick: handleOpenLearnMoreLink
})
}, {
label: intl.string(t["aBZ/oQ"]),
settings: [MobileSetting.DISCOVERY_BY_PHONE, MobileSetting.DISCOVERY_BY_EMAIL]
}, {
label: intl.string(t["+KNdnt"]),
settings: [MobileSetting.IOS_CONVERSATION_SUGGESTIONS]
}], r1);
return r98;
}, [allServersOptionSelected, sensitiveContentFilterHelpArticle]);
return <>
<SettingsScreenNotices screen={SettingsScreen.CONTENT_AND_SOCIAL} />
<SettingLayout node={useMemo(() => createList({
sections: memo2
}), [memo2])} />
</>;
}
export function ConnectedGamesPage() {
const styles = useStyles();
const authorizedSlayerApplications = useAuthorizedSlayerApplications();
const { showLoadingIndicator, slayerSdkApplications } = authorizedSlayerApplications;
const memo3 = useMemo(() => createList({
sections: [{
settings: [MobileSetting.ALLOW_GAME_FRIEND_DMS],
subLabel: intl.format(t.oZsHTD, {
helpdeskArticle: HelpdeskUtils.getArticleURL(HelpdeskArticles.SLAYER_GAME_FRIENDS)
})
}, {
settings: [MobileSetting.IN_GAME_DMS],
subLabel: intl.string(t["4NN4+/"])
}]
}), []);
return showLoadingIndicator ? <ActivityIndicator style={styles.loadingIndicator} /> : slayerSdkApplications.length === 0 ? <View style={styles.emptyContainer}>
<Text variant="text-md/semibold" color="text-strong">
{intl.string(t["+0U77d"])}
</Text>
<Text variant="text-sm/normal" color="text-muted">
{intl.format(t.V8wClM, {
helpdeskArticle: HelpdeskUtils.getArticleURL(HelpdeskArticles.SOCIAL_LAYER_CONNECTIONS)
})}
</Text>
</View> : <SettingLayout node={memo3} />;
}
@@ -0,0 +1,59 @@
// Metro module 13840 (f13841).
import UserStore from "../../../../stores/UserStore";
import RelationshipActionCreators from "../../../../actions/RelationshipActionCreators";
import useAnalyticsLocations from "../../../app_analytics/useAnalyticsLocations";
import { TableRow } from "../../../../design/components/TableRow/native/TableRow.native";
import { Avatar, AvatarSizes } from "../../../../design/void/native";
import { intl, t } from "../../../../intl/index.native";
import showUserProfileActionSheet from "../../../user_profile/native/showUserProfileActionSheet";
import { Button } from "../../../../design/components/Button/native/Button.native";
import { useStateFromStores } from "../../../../_bundle/Module589";
const IgnoredUserRow = function IgnoredUserRow(props) {
const userRecord = props.userRecord;
const analyticsLocations = useAnalyticsLocations().analyticsLocations;
const props2 = {
icon: <Avatar source={userRecord.getAvatarSource(void 0)} size={AvatarSizes.REFRESH_MEDIUM_32} />,
label: null,
subLabel: null,
labelLineClamp: 1,
subLabelLineClamp: 1,
accessibilityRole: "button",
accessibilityActions: null,
onAccessibilityAction: null,
onPress: null,
trailing: null
};
let label = userRecord != null;
if (label) {
let globalName = userRecord.globalName;
if (globalName == null) {
globalName = userRecord.username;
}
label = globalName;
}
props2.label = label;
props2.subLabel = userRecord?.globalName != null ? userRecord?.username : void 0;
props2.accessibilityActions = [{
name: "unignore",
label: intl.string(t["8wXU9B"])
}];
props2.onAccessibilityAction = function onAccessibilityAction(a0) {
if (a0.nativeEvent.actionName === "unignore") {
RelationshipActionCreators.unignoreUser(userRecord.id, "ignored-users-list-mobile");
return void 0;
}
};
props2.onPress = () => showUserProfileActionSheet({
userId: userRecord.id,
sourceAnalyticsLocations: analyticsLocations
});
props2.trailing = <Button size="sm" variant="secondary" text={intl.string(t["3GZE6a"])} onPress={() => {
RelationshipActionCreators.unignoreUser(userRecord.id, "ignored-users-list-mobile");
}} />;
return <TableRow {...props2} />;
};
export default function ConnectedIgnoredUserRow(props) {
const userId = props.userId;
const stateFromStores = useStateFromStores([UserStore], () => UserStore.getUser(userId));
return stateFromStores != null ? <IgnoredUserRow userRecord={stateFromStores} /> : null;
};
@@ -0,0 +1,48 @@
// Metro module 13839 (f13840).
import { ScrollView } from "react-native";
import RelationshipStore from "../../../../stores/RelationshipStore";
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
import Module712 from "../../../../_bundle/Module712";
import useAnalyticsLocations, { AnalyticsLocationProvider } from "../../../app_analytics/useAnalyticsLocations";
import AnalyticsLocation from "../../../app_analytics/AnalyticsLocation";
import { EmptyState } from "../../../../design/void/native";
import { Blocked } from "../../../../design/components/Illustration/native/redesign/generated/Blocked";
import { intl, t } from "../../../../intl/index.native";
import { SafeAreaPaddingView } from "../../../../components_native/common/SafeAreaView";
import { Text } from "../../../../design/components/Text/native/Text";
import { TableRowGroup } from "../../../../design/components/TableRow/native/TableRowGroup.native";
import IgnoredUserRow from "./IgnoredUserRow";
import { useStateFromStoresArray } from "../../../../_bundle/Module589";
let useStyles;
const IgnoredUsersList = function IgnoredUsersList(props) {
const userIds = props.userIds;
const styles = useStyles();
const analyticsLocations = useAnalyticsLocations(AnalyticsLocation.IGNORED_USERS).analyticsLocations;
return userIds.length === 0 ? <EmptyState Illustration={Blocked} body={intl.string(t.PYrWFW)} /> : <AnalyticsLocationProvider value={analyticsLocations}>
<SafeAreaPaddingView bottom style={styles.list}>
<ScrollView>
<Text style={styles.sectionLabelStyle} variant="text-sm/semibold" color="text-default">
{intl.formatToPlainString(t.iNKUhU, {
numberOfIgnoredUsers: userIds.length
})}
</Text>
<TableRowGroup key={intl.string(t["93ZDWE"])} hasIcons>
{userIds.map((a0) => <IgnoredUserRow key={a0} userId={a0} />)}
</TableRowGroup>
</ScrollView>
</SafeAreaPaddingView>
</AnalyticsLocationProvider>;
};
useStyles = createStyles({
list: {
marginTop: Module712.space.PX_8,
paddingHorizontal: Module712.space.PX_16
},
sectionLabelStyle: {
marginTop: Module712.space.PX_12,
marginBottom: Module712.space.PX_8
}
});
export default function ConnectedIgnoredUsersList() {
return <IgnoredUsersList userIds={useStateFromStoresArray([RelationshipStore], () => RelationshipStore.getIgnoredIDs())} />;
};
@@ -0,0 +1,22 @@
// Metro module 13848 (f13849).
import { SafetySettingsNoticeType } from "../../../safety_common/Constants";
import { useSensitiveContentFilterHelpArticle } from "../../../explicit_media_redaction/SensitiveMediaGoreRedactionSettingsUtils";
import SafetySettingsNotice from "../../../safety_common/native/SafetySettingsNotice";
import { t } from "../../../../intl/index.native";
import Linking from "../../../../lib/native/Linking";
import HelpdeskUtils from "../../../../utils/HelpdeskUtils";
import AgeVerificationActionCreators_native from "../../../age_assurance/AgeVerificationActionCreators.native";
import { AgeVerificationModalEntryPoint } from "../../../age_assurance/AgeVerificationAnalyticsUtils";
export function SensitiveContentFiltersTeenNotice() {
const sensitiveContentFilterHelpArticle = useSensitiveContentFilterHelpArticle();
return <SafetySettingsNotice label={t.EUo0yj} labelHook={function labelHook() {
Linking.openURL(HelpdeskUtils.getArticleURL(sensitiveContentFilterHelpArticle));
}} noticeType={SafetySettingsNoticeType.SENSITIVE_CONTENT_FILTER_TEEN_NOTICE} />;
}
export function SensitiveContentFiltersAgeVerificationNotice() {
return <SafetySettingsNotice label={t.OX4ybh} labelHook={function labelHook() {
AgeVerificationActionCreators_native.showAgeVerificationGetStartedModal({
entryPoint: AgeVerificationModalEntryPoint.CONTENT_AND_SOCIAL_NOTICE
});
}} noticeType={SafetySettingsNoticeType.SENSITIVE_CONTENT_FILTER_AGE_VERIFICATION_NOTICE} />;
}
@@ -0,0 +1,23 @@
// Metro module 13845 (f13846).
import { useMemo } from "react";
import { MobileSetting } from "../../core/native/SettingsConstants";
import { intl, t } from "../../../../intl/index.native";
import { createList } from "../../../settings/native/renderer/SettingBuilders";
import SettingsScreenNotices, { SettingsScreen } from "../../privacy_and_safety/native/SettingsScreenNotices";
import SettingLayout from "../../../settings/native/renderer/SettingLayout";
export default function UserSettingsSensitiveContentFilters() {
return <>
<SettingsScreenNotices screen={SettingsScreen.SENSITIVE_CONTENT_FILTERS} />
<SettingLayout node={useMemo(() => createList({
sections: [{
label: intl.string(t.GYpoAq),
settings: [MobileSetting.EXPLICIT_MEDIA_FILTERS_FRIENDS_DMS, MobileSetting.EXPLICIT_MEDIA_FILTERS_NON_FRIENDS_DMS, MobileSetting.EXPLICIT_MEDIA_FILTERS_GUILDS],
subLabel: intl.string(t.Wnojv1)
}, {
label: intl.string(t["16/3Bi"]),
settings: [MobileSetting.GORE_MEDIA_FILTERS_FRIENDS_DMS, MobileSetting.GORE_MEDIA_FILTERS_NON_FRIENDS_DMS, MobileSetting.GORE_MEDIA_FILTERS_GUILDS],
subLabel: intl.string(t.XgH9eh)
}]
}), [])} />
</>;
};
@@ -0,0 +1,21 @@
// Metro module 15607 (f15608).
import { useMemo } from "react";
import { View } from "react-native";
import { AllFriendSourceFlags, FriendSourceFlags } from "../../../../Constants";
import { FriendSourceFlagsSetting } from "../../UserSettings";
import { computeFlags } from "../../../../utils/UserSettingsUtils";
import { TableRowGroup } from "../../../../design/components/TableRow/native/TableRowGroup.native";
import { intl, t } from "../../../../intl/index.native";
import { TableSwitchRow } from "../../../../design/components/TableRow/native/TableSwitchRow.native";
import { addFlag, removeFlags } from "../../../../_bundle/Module1384";
export default function UserSettingsFriendRequests() {
const setting = FriendSourceFlagsSetting.useSetting();
const memo = useMemo(() => computeFlags(setting), [setting]);
return <View>
<TableRowGroup title={intl.string(t.vyodkM)} hasIcons={false}>
<TableSwitchRow label={intl.string(t.mGr3CX)} value={memo.all} onValueChange={(value) => FriendSourceFlagsSetting.updateSetting(value ? AllFriendSourceFlags : AllFriendSourceFlags & ~FriendSourceFlags.NO_RELATION)} />
<TableSwitchRow label={intl.string(t.IqlCSq)} value={memo.mutualFriends} onValueChange={(value) => FriendSourceFlagsSetting.updateSetting(value ? addFlag(setting, FriendSourceFlags.MUTUAL_FRIENDS) : removeFlags(setting, FriendSourceFlags.MUTUAL_FRIENDS, FriendSourceFlags.NO_RELATION))} />
<TableSwitchRow label={intl.string(t.mozb8f)} value={memo.mutualGuilds} onValueChange={(value) => FriendSourceFlagsSetting.updateSetting(value ? addFlag(setting, FriendSourceFlags.MUTUAL_GUILDS) : removeFlags(setting, FriendSourceFlags.MUTUAL_GUILDS, FriendSourceFlags.NO_RELATION))} />
</TableRowGroup>
</View>;
};
@@ -0,0 +1,9 @@
// Metro module 14669 (f14670).
import { useMemo } from "react";
import { FriendSourceFlagsSetting } from "../UserSettings";
import { computeFlags } from "../../../utils/UserSettingsUtils";
export function useAllowFriendsFromMutualGuildsOnly() {
const setting = FriendSourceFlagsSetting.useSetting();
const memo = useMemo(() => computeFlags(setting), [setting]);
return memo.mutualGuilds && !memo.all;
}
@@ -0,0 +1,27 @@
// Metro module 13870 (f13871).
import UserStore from "../../../stores/UserStore";
import { ExplicitContentFilterToDmSpamFilterV2 } from "../privacy_and_safety/DMSafetyConstants";
import { DmSpamFilterV2, ExplicitContentFilter } from "../UserSettings";
import { useStateFromStores } from "../../../_bundle/Module589";
import { useIsSettingTeenByDefault } from "../../regional_feature_config/RegionalFeatureConfigUtils";
import { SettingsDefaultFeature } from "../../../_bundle/Module3875";
import * as _Module1306 from "../../../_bundle/Module1306";
export function useDerivedDmSpamFilterSettingValue() {
let FRIENDS_AND_NON_FRIENDS;
let r14 = DmSpamFilterV2.useSetting();
const setting = ExplicitContentFilter.useSetting();
const stateFromStores = useStateFromStores([UserStore], () => UserStore.getCurrentUser());
const isSettingTeenByDefault = useIsSettingTeenByDefault(SettingsDefaultFeature.SPAM_FILTERS);
if (r14 === _Module1306.DmSpamFilterV2.DEFAULT_UNSET) {
if (stateFromStores?.nsfwAllowed === false && isSettingTeenByDefault) {
FRIENDS_AND_NON_FRIENDS = _Module1306.DmSpamFilterV2.FRIENDS_AND_NON_FRIENDS;
} else {
FRIENDS_AND_NON_FRIENDS = ExplicitContentFilterToDmSpamFilterV2.get(setting);
if (FRIENDS_AND_NON_FRIENDS == null) {
FRIENDS_AND_NON_FRIENDS = _Module1306.DmSpamFilterV2.NON_FRIENDS;
}
}
r14 = FRIENDS_AND_NON_FRIENDS;
}
return r14;
}
@@ -0,0 +1,12 @@
// Metro module 5707 (f5708).
import UserStore from "../../../stores/UserStore";
import { useStateFromStores } from "../../../_bundle/Module589";
export function useNSFWAllowed() {
return useStateFromStores([UserStore], () => {
let r6 = UserStore.getCurrentUser()?.nsfwAllowed;
if (r6 == null) {
r6 = null;
}
return r6;
});
}