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,44 @@
// Metro module 9662 (f9663).
import { createApexExperiment } from "../experiments/apex/index";
const apexExperiment = createApexExperiment({
name: "2026-07-game-mentions-v2-mobile",
kind: "user",
defaultConfig: {
enabled: false,
showNewTag: false,
combineMentionAutocomplete: false
},
variations: {
0: {
enabled: false,
showNewTag: false,
combineMentionAutocomplete: false
},
1: {
enabled: true,
showNewTag: true,
combineMentionAutocomplete: false
},
2: {
enabled: true,
showNewTag: false,
combineMentionAutocomplete: false
},
3: {
enabled: true,
showNewTag: false,
combineMentionAutocomplete: true
}
}
});
export { apexExperiment as GameMentionsExperiment };
export function useGameMentionsExperiment(a0) {
return apexExperiment.useConfig({
location: a0.location
});
}
export function getGameMentionsExperiment(a0) {
return apexExperiment.getConfig({
location: a0.location
});
}
@@ -0,0 +1,12 @@
// Metro module 9661 (f9662).
import { getGameMentionsExperiment } from "./GameMentionsExperiment.native";
import { IncludeGameMentionsInAutocomplete } from "../user_settings/UserSettings";
export function getGameMentionsAutocompleteConfig(a0) {
const gameMentionsExperiment = getGameMentionsExperiment({
location: a0
});
return {
...gameMentionsExperiment,
enabled: gameMentionsExperiment.enabled && IncludeGameMentionsInAutocomplete.getSetting()
};
}
@@ -0,0 +1,12 @@
// Metro module 11488 (f11489).
import { StyleSheet } from "react-native";
import { useScaledTextLineHeight } from "../../../screen/native/useScaledTextLineHeight.android";
let c7825_3 = "text-sm/semibold";
let c7825_4 = "text-sm/medium";
export default function useGameMentionSearchBarHeight() {
return 24 + useScaledTextLineHeight(c7825_3) + useScaledTextLineHeight(c7825_4) + 12 + StyleSheet.hairlineWidth;
};
export const GAME_MENTION_SEARCH_BAR_TITLE_VARIANT = "text-sm/semibold";
export const GAME_MENTION_SEARCH_BAR_DESCRIPTION_VARIANT = "text-sm/medium";
export const GAME_MENTION_SEARCH_BAR_HEADER_PADDING_VERTICAL = 12;
export const GAME_MENTION_SEARCH_BAR_DESCRIPTION_PADDING_BOTTOM = 12;
@@ -0,0 +1,40 @@
// Metro module 9066 (f9067).
import { useMemo } from "react";
import GameStore from "../../games/GameStore";
import UserStore from "../../../stores/UserStore";
import { GAME_MENTION_RAW_RE_GLOBAL, extractGameMentionIds } from "../../channel_autocomplete/ChannelAutocompleteConstants";
import { useGames } from "../../games/hooks/useGame";
import { useStateFromStores } from "../../../_bundle/Module589";
import { isNullOrEmpty } from "../../../utils/StringUtils";
import { isGameProfileObscured } from "../../game_profile/hooks/useGameProfileObscured";
import { intl, t } from "../../../intl/index.native";
export function useGameMentionsAsPlainText(a0) {
let c16937_0 = a0;
const memo = useMemo(() => {
let r4 = c16937_0;
if (r4 == null) {
r4 = "";
}
return extractGameMentionIds(r4);
}, [a0]);
useGames(memo);
return useStateFromStores([GameStore, UserStore], () => {
if (!isNullOrEmpty(c16937_0) && memo.length !== 0) {
const nsfwAllowed = UserStore.getCurrentUser()?.nsfwAllowed;
return c16937_0.replace(GAME_MENTION_RAW_RE_GLOBAL, (a0, a1) => {
let r16;
const game = GameStore.getGame(a1);
if (isGameProfileObscured(game, nsfwAllowed)) {
r16 = intl.string(t["11pdXZ"]);
} else {
r16 = game?.name;
if (r16 == null) {
r16 = intl.string(t["11pdXZ"]);
}
}
return r16;
});
}
return c16937_0;
}, [a0, memo]);
}
@@ -0,0 +1,48 @@
// Metro module 11500 (f11501).
import { memo } from "react";
import { View } from "react-native";
import { createStyles } from "../../../design/components/Styles/native/createStyles";
import Module712 from "../../../_bundle/Module712";
import { GAME_MENTION_SEARCH_BAR_HEADER_PADDING_VERTICAL, GAME_MENTION_SEARCH_BAR_DESCRIPTION_PADDING_BOTTOM, GAME_MENTION_SEARCH_BAR_TITLE_VARIANT, GAME_MENTION_SEARCH_BAR_DESCRIPTION_VARIANT } from "../hooks/native/useGameMentionSearchBarHeight";
import { GameControllerIcon } from "../../../design/components/Icon/native/redesign/generated/GameControllerIcon";
import { Text } from "../../../design/components/Text/native/Text";
import { intl, t } from "../../../intl/index.native";
import { FormDivider } from "../../../design/void/Form/native/index";
const useStyles = createStyles({
container: {
backgroundColor: Module712.colors.MOBILE_FLOATING_ACCESSORY_BACKGROUND
},
headerRow: {
flexDirection: "row",
alignItems: "center",
paddingHorizontal: 16,
paddingVertical: GAME_MENTION_SEARCH_BAR_HEADER_PADDING_VERTICAL
},
icon: {
marginRight: 12
},
description: {
paddingHorizontal: 16,
paddingBottom: GAME_MENTION_SEARCH_BAR_DESCRIPTION_PADDING_BOTTOM
},
divider: {
marginLeft: 0,
backgroundColor: Module712.colors.MOBILE_COMMAND_BAR_DIVIDER
}
});
const r48 = memo(function GameMentionSearchBar() {
const styles = useStyles();
return <View style={styles.container}>
<View accessible accessibilityRole="header">
<View style={styles.headerRow}>
<GameControllerIcon size="sm" style={styles.icon} />
<Text variant={GAME_MENTION_SEARCH_BAR_TITLE_VARIANT} color="mobile-text-heading-primary">@game</Text>
</View>
<Text style={styles.description} variant={GAME_MENTION_SEARCH_BAR_DESCRIPTION_VARIANT} color="text-muted">
{intl.string(t["1kR88y"])}
</Text>
</View>
<FormDivider style={styles.divider} />
</View>;
});
export default r48;