60 lines
4.3 KiB
TypeScript
60 lines
4.3 KiB
TypeScript
/* Metro module 8692; source: modules/user_profile/native/UserProfileCustomStatusActionSheet.tsx; dependencies: [31, 27, 1878, 6816, 33, 4501, 697, 566, 8693, 4617, 1244, 8694, 8417, 8513, 2] */
|
|
function _fun68306(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8877:6, offset: 0x01c48396, size: 377 bytes, params: 8, frame: 25
|
|
var object3;
|
|
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 userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
|
let value = require(6816) /* metro dependency 6816: Constants */;
|
|
const AVATAR_CONTAINER_SIZE = value.AVATAR_CONTAINER_SIZE;
|
|
const AVATAR_CUSTOM_STATUS_GAP = value.AVATAR_CUSTOM_STATUS_GAP;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_5 = value.jsx;
|
|
const env0_6 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object3 = {};
|
|
const object4 = {flexDirection: 'row', columnGap: AVATAR_CUSTOM_STATUS_GAP};
|
|
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object4.marginHorizontal = PX_16;
|
|
object3.statusPreviewContainer = object4;
|
|
object3.avatarContainer = {height: AVATAR_CONTAINER_SIZE, width: AVATAR_CONTAINER_SIZE, alignItems: 'center',
|
|
justifyContent: 'center'};
|
|
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
|
object3.avatarStatus = {backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
|
|
object3.customStatusBubble = {'marginTop': null, 'flexShrink': 1, 'flexGrow': 1,
|
|
marginTop: AVATAR_CONTAINER_SIZE / 2 + 10};
|
|
const env0_7 = Reflect.apply(createStyles, value, [object3]);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileCustomStatusActionSheet.tsx');
|
|
exports.default = UserProfileCustomStatusActionSheet;
|
|
}
|
|
|
|
function UserProfileCustomStatusActionSheet({user, guildId, channelId, previewEmoji, previewText}) { // fn#68307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8877:669, offset: 0x01c4850f, size: 460 bytes, params: 2, frame: 27
|
|
const styles = useStyles();
|
|
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun68308, [user]);
|
|
const value3 = (importDefault(8693) /* metro dependency 8693: useCustomStatusActivityForUser */)(user.id);
|
|
const value4 = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).useName(guildId, channelId, user);
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const r5 = value2 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.AHoLf4) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['pP5Aa+'],
|
|
{username: value4});
|
|
const UserProfileStackedActionSheet = importDefault(8694) /* metro dependency 8694: UserProfileStackedActionSheet */;
|
|
let value = importDefault(8417) /* metro dependency 8417: HeaderAvatar */;
|
|
value = <View style={styles.avatarContainer}>{((Component) => <Component user={user} statusStyle={styles.avatarStatus} />)(value)}</View>;
|
|
return (
|
|
<UserProfileStackedActionSheet title={r5}>
|
|
<View style={styles.statusPreviewContainer}>
|
|
{value}
|
|
{((Component) => <Component customStatusActivity={value3} hasCustomProfileTheme={false} showFullStatus style={styles.customStatusBubble} previewEmoji={previewEmoji} previewText={previewText} />)(importDefault(8513) /* metro dependency 8513: UserProfileCustomStatusBubble */)}
|
|
</View>
|
|
</UserProfileStackedActionSheet>
|
|
);
|
|
}
|
|
|
|
function _fun68308() { // fn#68308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8877:818, offset: 0x01c486db, size: 50 bytes, params: 1, frame: 10
|
|
const value = environment.__proto__;
|
|
return UserStore.getCurrentUser()?.id === user.id;
|
|
}
|
|
|