1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Added GoToSocial support

Fix #206
Fix https://github.com/superseriousbusiness/gotosocial/issues/825
This commit is contained in:
xmflsct
2023-01-08 20:07:20 +01:00
parent 43c0447418
commit a3b5a132c5
7 changed files with 30 additions and 70 deletions

View File

@ -21,7 +21,8 @@ import { Pressable, View } from 'react-native'
import StatusContext from './Context'
const TimelinePoll: React.FC = () => {
const { queryKey, status, ownAccount, spoilerHidden, disableDetails } = useContext(StatusContext)
const { queryKey, status, ownAccount, spoilerHidden, disableDetails, highlighted } =
useContext(StatusContext)
if (!queryKey || !status || !status.poll) return null
const poll = status.poll
@ -92,7 +93,7 @@ const TimelinePoll: React.FC = () => {
/>
</View>
)
} else {
} else if (highlighted) {
return (
<View style={{ marginRight: StyleConstants.Spacing.S }}>
<Button
@ -166,7 +167,7 @@ const TimelinePoll: React.FC = () => {
borderTopRightRadius: 10,
borderBottomRightRadius: 10,
marginTop: StyleConstants.Spacing.XS,
marginBottom: StyleConstants.Spacing.S,
marginBottom: StyleConstants.Spacing.XS,
width: `${Math.round(
(option.votes_count / (poll.voters_count || poll.votes_count)) * 100
)}%`,