mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Check for Wildebeest's account ID format
This commit is contained in:
@ -22,7 +22,7 @@ import { Pressable, StyleSheet, View } from 'react-native'
|
||||
import StatusContext from './Context'
|
||||
|
||||
const TimelineActions: React.FC = () => {
|
||||
const { queryKey, status, ownAccount, highlighted, disableDetails } = useContext(StatusContext)
|
||||
const { queryKey, status, isMyAccount, highlighted, disableDetails } = useContext(StatusContext)
|
||||
if (!queryKey || !status || disableDetails) return null
|
||||
|
||||
const navigationState = useNavState()
|
||||
@ -182,7 +182,7 @@ const TimelineActions: React.FC = () => {
|
||||
const childrenReblog = () => {
|
||||
const color = (state: boolean) => (state ? colors.green : colors.secondary)
|
||||
const disabled =
|
||||
status.visibility === 'direct' || (status.visibility === 'private' && !ownAccount)
|
||||
status.visibility === 'direct' || (status.visibility === 'private' && !isMyAccount)
|
||||
return (
|
||||
<>
|
||||
<Icon
|
||||
@ -196,7 +196,7 @@ const TimelineActions: React.FC = () => {
|
||||
fontStyle='S'
|
||||
style={{
|
||||
color:
|
||||
status.visibility === 'private' && !ownAccount
|
||||
status.visibility === 'private' && !isMyAccount
|
||||
? colors.disabled
|
||||
: color(status.reblogged),
|
||||
marginLeft: StyleConstants.Spacing.XS
|
||||
@ -258,7 +258,7 @@ const TimelineActions: React.FC = () => {
|
||||
onPress={onPressReblog}
|
||||
children={childrenReblog()}
|
||||
disabled={
|
||||
status.visibility === 'direct' || (status.visibility === 'private' && !ownAccount)
|
||||
status.visibility === 'direct' || (status.visibility === 'private' && !isMyAccount)
|
||||
}
|
||||
/>
|
||||
|
||||
|
@ -8,7 +8,7 @@ type StatusContextType = {
|
||||
|
||||
status?: Mastodon.Status
|
||||
|
||||
ownAccount?: boolean
|
||||
isMyAccount?: boolean
|
||||
spoilerHidden?: boolean
|
||||
rawContent?: React.MutableRefObject<string[]> // When highlighted, for translate, edit history
|
||||
detectedLanguage?: React.MutableRefObject<string>
|
||||
|
@ -21,7 +21,7 @@ import { Pressable, View } from 'react-native'
|
||||
import StatusContext from './Context'
|
||||
|
||||
const TimelinePoll: React.FC = () => {
|
||||
const { queryKey, status, ownAccount, spoilerHidden, disableDetails, highlighted } =
|
||||
const { queryKey, status, isMyAccount, spoilerHidden, disableDetails, highlighted } =
|
||||
useContext(StatusContext)
|
||||
if (!queryKey || !status || !status.poll) return null
|
||||
const poll = status.poll
|
||||
@ -72,7 +72,7 @@ const TimelinePoll: React.FC = () => {
|
||||
|
||||
const pollButton = () => {
|
||||
if (!poll.expired) {
|
||||
if (!ownAccount && !poll.voted) {
|
||||
if (!isMyAccount && !poll.voted) {
|
||||
return (
|
||||
<View style={{ marginRight: StyleConstants.Spacing.S }}>
|
||||
<Button
|
||||
|
Reference in New Issue
Block a user