diff --git a/src/view/com/composer/text-input/web/EmojiPicker.web.tsx b/src/view/com/composer/text-input/web/EmojiPicker.web.tsx index 1493621160..1f4178f7f8 100644 --- a/src/view/com/composer/text-input/web/EmojiPicker.web.tsx +++ b/src/view/com/composer/text-input/web/EmojiPicker.web.tsx @@ -1,11 +1,13 @@ import React from 'react' -import Picker from '@emoji-mart/react' import { - StyleSheet, + GestureResponderEvent, TouchableWithoutFeedback, useWindowDimensions, View, } from 'react-native' +import Picker from '@emoji-mart/react' + +import {atoms as a} from '#/alf' import {textInputWebEmitter} from '../TextInput.web' const HEIGHT_OFFSET = 40 @@ -96,12 +98,29 @@ export function EmojiPicker({state, close}: IProps) { if (!state.isOpen) return null + const onPressBackdrop = (e: GestureResponderEvent) => { + // @ts-ignore web only + if (e.nativeEvent?.pointerId === -1) return + close() + } + return ( - + {/* eslint-disable-next-line react-native-a11y/has-valid-accessibility-descriptors */} e.stopPropagation()}> @@ -118,20 +137,3 @@ export function EmojiPicker({state, close}: IProps) { ) } - -const styles = StyleSheet.create({ - mask: { - // @ts-ignore web ony - position: 'fixed', - top: 0, - left: 0, - right: 0, - width: '100%', - height: '100%', - alignItems: 'center', - }, - picker: { - marginHorizontal: 'auto', - paddingRight: 50, - }, -}) diff --git a/src/view/com/post/Post.tsx b/src/view/com/post/Post.tsx index 51a1381ec8..a05339d4dc 100644 --- a/src/view/com/post/Post.tsx +++ b/src/view/com/post/Post.tsx @@ -15,6 +15,7 @@ import {useQueryClient} from '@tanstack/react-query' import {moderatePost_wrapped as moderatePost} from '#/lib/moderatePost_wrapped' import {POST_TOMBSTONE, Shadow, usePostShadow} from '#/state/cache/post-shadow' import {useModerationOpts} from '#/state/preferences/moderation-opts' +import {useSession} from '#/state/session' import {useComposerControls} from '#/state/shell/composer' import {MAX_POST_LINES} from 'lib/constants' import {usePalette} from 'lib/hooks/usePalette' @@ -145,6 +146,9 @@ function PostInner({ precacheProfile(queryClient, post.author) }, [queryClient, post.author]) + const {currentAccount} = useSession() + const isMe = replyAuthorDid === currentAccount?.did + return ( - - Reply to{' '} - - - - + {isMe ? ( + Reply to you + ) : ( + + Reply to{' '} + + + + + )} )} diff --git a/src/view/com/posts/FeedItem.tsx b/src/view/com/posts/FeedItem.tsx index cc767a4a3d..a59eeea52e 100644 --- a/src/view/com/posts/FeedItem.tsx +++ b/src/view/com/posts/FeedItem.tsx @@ -43,6 +43,7 @@ import {Text} from '../util/text/Text' import {PreviewableUserAvatar} from '../util/UserAvatar' import {AviFollowButton} from './AviFollowButton' import hairlineWidth = StyleSheet.hairlineWidth +import {useSession} from '#/state/session' import {Repost_Stroke2_Corner2_Rounded as Repost} from '#/components/icons/Repost' interface FeedItemProps { @@ -200,6 +201,11 @@ let FeedItemInner = ({ }, ] + const {currentAccount} = useSession() + const isOwner = + AppBskyFeedDefs.isReasonRepost(reason) && + reason.by.did === currentAccount?.did + return ( - - Reposted by{' '} - - - - + {isOwner ? ( + Reposted by you + ) : ( + + Reposted by{' '} + + + + + )} ) : null} @@ -421,6 +435,9 @@ function ReplyToLabel({ blocked?: boolean }) { const pal = usePalette('default') + const {currentAccount} = useSession() + const isMe = profile.did === currentAccount?.did + return ( - {blocked ? ( + {isMe ? ( + Reply to you + ) : blocked ? ( Reply to a blocked post ) : (