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

Show pinned posts in Account page

This commit is contained in:
Zhiyuan Zheng
2020-12-14 23:44:57 +01:00
parent 177afe1dd1
commit fe1ca72a3e
5 changed files with 226 additions and 126 deletions

View File

@ -8,13 +8,12 @@ import { StyleConstants } from '@utils/styles/constants'
export interface Props {
account: Mastodon.Account
action: 'favourite' | 'follow' | 'mention' | 'poll' | 'reblog'
action: 'favourite' | 'follow' | 'mention' | 'poll' | 'reblog' | 'pinned'
notification?: boolean
}
const TimelineActioned: React.FC<Props> = ({
account,
action,
notification = false
}) => {
@ -25,6 +24,17 @@ const TimelineActioned: React.FC<Props> = ({
let icon
let content
switch (action) {
case 'pinned':
icon = (
<Feather
name='anchor'
size={StyleConstants.Font.Size.S}
color={iconColor}
style={styles.icon}
/>
)
content = `置顶`
break
case 'favourite':
icon = (
<Feather