about summary refs log tree commit diff
path: root/src/view/com/post-thread/PostThreadItem.tsx
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2024-02-09 20:00:21 +0000
committerGitHub <noreply@github.com>2024-02-09 12:00:21 -0800
commitad8f9e560d7f320d1b7db5b816b17db825b86ce7 (patch)
tree629b0c69cc38fa0437b28a52dea54512ff960427 /src/view/com/post-thread/PostThreadItem.tsx
parent7f4dbe9454d4ebc2e836777c9b28fe04943d18f3 (diff)
downloadvoidsky-ad8f9e560d7f320d1b7db5b816b17db825b86ce7.tar.zst
Always show post dropdown button at the bottom of the post, add share button to highlighted post (#2646)
* Always show post dropdown at the bottom

* Rm useless view (no longer needed)

* space icons evenly in big, add equal padding

* add share icon

* add onShare

* confirmed figma noob. figured it out.

* use our svg naming strat

* Update icon

---------

Co-authored-by: Hailey <me@haileyok.com>
Co-authored-by: Eric Bailey <git@esb.lol>
Diffstat (limited to 'src/view/com/post-thread/PostThreadItem.tsx')
-rw-r--r--src/view/com/post-thread/PostThreadItem.tsx25
1 files changed, 1 insertions, 24 deletions
diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx
index d11c2781b..d3ca6f356 100644
--- a/src/view/com/post-thread/PostThreadItem.tsx
+++ b/src/view/com/post-thread/PostThreadItem.tsx
@@ -23,7 +23,6 @@ import {getTranslatorLink, isPostInLanguage} from '../../../locale/helpers'
 import {PostMeta} from '../util/PostMeta'
 import {PostEmbeds} from '../util/post-embeds'
 import {PostCtrls} from '../util/post-ctrls/PostCtrls'
-import {PostDropdownBtn} from '../util/forms/PostDropdownBtn'
 import {PostHider} from '../util/moderation/PostHider'
 import {ContentHider} from '../util/moderation/ContentHider'
 import {PostAlerts} from '../util/moderation/PostAlerts'
@@ -43,7 +42,6 @@ import {useModerationOpts} from '#/state/queries/preferences'
 import {useOpenLink} from '#/state/preferences/in-app-browser'
 import {Shadow, usePostShadow, POST_TOMBSTONE} from '#/state/cache/post-shadow'
 import {ThreadPost} from '#/state/queries/post-thread'
-import {useSession} from '#/state/session'
 import {WhoCanReply} from '../threadgate/WhoCanReply'
 
 export function PostThreadItem({
@@ -162,7 +160,6 @@ let PostThreadItemLoaded = ({
   const {_} = useLingui()
   const langPrefs = useLanguagePrefs()
   const {openComposer} = useComposerControls()
-  const {currentAccount} = useSession()
   const [limitLines, setLimitLines] = React.useState(
     () => countLines(richText?.text) >= MAX_POST_LINES,
   )
@@ -188,9 +185,6 @@ let PostThreadItemLoaded = ({
     return makeProfileLink(post.author, 'post', urip.rkey, 'reposted-by')
   }, [post.uri, post.author])
   const repostsTitle = _(msg`Reposts of this post`)
-  const isModeratedPost =
-    moderation.decisions.post.cause?.type === 'label' &&
-    moderation.decisions.post.cause.label.src !== currentAccount?.did
 
   const translatorUrl = getTranslatorLink(
     record?.text || '',
@@ -331,23 +325,6 @@ let PostThreadItemLoaded = ({
                 </Link>
               </View>
             </View>
-            <PostDropdownBtn
-              testID="postDropdownBtn"
-              postAuthor={post.author}
-              postCid={post.cid}
-              postUri={post.uri}
-              record={record}
-              richText={richText}
-              showAppealLabelItem={
-                post.author.did === currentAccount?.did && isModeratedPost
-              }
-              style={{
-                paddingVertical: 6,
-                paddingHorizontal: 10,
-                marginLeft: 'auto',
-                width: 40,
-              }}
-            />
           </View>
           <View style={[s.pl10, s.pr10, s.pb10]}>
             <ContentHider
@@ -437,7 +414,7 @@ let PostThreadItemLoaded = ({
             ) : (
               <></>
             )}
-            <View style={[s.pl10, s.pb5]}>
+            <View style={[s.pl10, s.pr10, s.pb5]}>
               <PostCtrls
                 big
                 post={post}