Some me model cleanup (#1928)
* Replace me model in post dropdown btn * Replace delete account logic * Replace me model in bottom bar web * Replace me model in bottom bar * Replace me model in reply prompt * Better fallback * Fix reference * Fix bad ref in bottom bar
This commit is contained in:
parent
a652b52b88
commit
310a7eaca7
5 changed files with 41 additions and 22 deletions
|
@ -15,12 +15,12 @@ import {EventStopper} from '../EventStopper'
|
|||
import {useModalControls} from '#/state/modals'
|
||||
import {makeProfileLink} from '#/lib/routes/links'
|
||||
import {getTranslatorLink} from '#/locale/helpers'
|
||||
import {useStores} from '#/state'
|
||||
import {usePostDeleteMutation} from '#/state/queries/post'
|
||||
import {useMutedThreads, useToggleThreadMute} from '#/state/muted-threads'
|
||||
import {useLanguagePrefs} from '#/state/preferences'
|
||||
import {logger} from '#/logger'
|
||||
import {Shadow} from '#/state/cache/types'
|
||||
import {useSession} from '#/state/session'
|
||||
|
||||
export function PostDropdownBtn({
|
||||
testID,
|
||||
|
@ -33,7 +33,7 @@ export function PostDropdownBtn({
|
|||
record: AppBskyFeedPost.Record
|
||||
style?: StyleProp<ViewStyle>
|
||||
}) {
|
||||
const store = useStores()
|
||||
const {currentAccount} = useSession()
|
||||
const theme = useTheme()
|
||||
const defaultCtrlColor = theme.palette.default.postCtrl
|
||||
const {openModal} = useModalControls()
|
||||
|
@ -44,7 +44,7 @@ export function PostDropdownBtn({
|
|||
|
||||
const rootUri = record.reply?.root?.uri || post.uri
|
||||
const isThreadMuted = mutedThreads.includes(rootUri)
|
||||
const isAuthor = post.author.did === store.me.did
|
||||
const isAuthor = post.author.did === currentAccount?.did
|
||||
const href = React.useMemo(() => {
|
||||
const urip = new AtUri(post.uri)
|
||||
return makeProfileLink(post.author, 'post', urip.rkey)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue