mirror of https://github.com/tooot-app/app
Push add more types
This commit is contained in:
parent
242b11761b
commit
6b4c2d18ec
|
@ -376,10 +376,12 @@ declare namespace Mastodon {
|
|||
endpoint: string
|
||||
alerts: {
|
||||
follow: boolean
|
||||
follow_request: boolean
|
||||
favourite: boolean
|
||||
reblog: boolean
|
||||
mention: boolean
|
||||
poll: boolean
|
||||
status: boolean
|
||||
}
|
||||
server_key: string
|
||||
}
|
||||
|
|
|
@ -169,6 +169,9 @@
|
|||
"follow": {
|
||||
"heading": "New follower"
|
||||
},
|
||||
"follow_request": {
|
||||
"heading": "Follow request"
|
||||
},
|
||||
"favourite": {
|
||||
"heading": "Favourited"
|
||||
},
|
||||
|
@ -181,6 +184,9 @@
|
|||
"poll": {
|
||||
"heading": "Poll updates"
|
||||
},
|
||||
"status": {
|
||||
"heading": "Toot from subscribed users"
|
||||
},
|
||||
"howitworks": "Learn how routing works"
|
||||
},
|
||||
"root": {
|
||||
|
|
|
@ -73,12 +73,22 @@ const TabMePush: React.FC = () => {
|
|||
const alerts = useMemo(() => {
|
||||
return instancePush?.alerts
|
||||
? (
|
||||
['follow', 'favourite', 'reblog', 'mention', 'poll'] as [
|
||||
[
|
||||
'follow',
|
||||
'follow_request',
|
||||
'favourite',
|
||||
'reblog',
|
||||
'mention',
|
||||
'poll'
|
||||
'poll',
|
||||
'status'
|
||||
] as [
|
||||
'follow',
|
||||
'follow_request',
|
||||
'favourite',
|
||||
'reblog',
|
||||
'mention',
|
||||
'poll',
|
||||
'status'
|
||||
]
|
||||
).map(alert => (
|
||||
<MenuRow
|
||||
|
|
|
@ -14,7 +14,7 @@ import { useDispatch, useSelector } from 'react-redux'
|
|||
|
||||
const TabMeSettingsLanguage: React.FC<
|
||||
TabMeStackScreenProps<'Tab-Me-Settings-Language'>
|
||||
> = () => {
|
||||
> = ({ navigation }) => {
|
||||
const { i18n, t } = useTranslation('screenTabs')
|
||||
const languages = Object.entries(LOCALES)
|
||||
const instances = useSelector(getInstances)
|
||||
|
@ -72,6 +72,8 @@ const TabMeSettingsLanguage: React.FC<
|
|||
}
|
||||
})
|
||||
}
|
||||
|
||||
navigation.pop(1)
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
@ -110,6 +110,20 @@ const instancesMigration = {
|
|||
...instance.notifications_filter,
|
||||
status: true,
|
||||
update: true
|
||||
},
|
||||
push: {
|
||||
...instance.push,
|
||||
alerts: {
|
||||
...instance.push.alerts,
|
||||
follow_request: {
|
||||
loading: false,
|
||||
value: true
|
||||
},
|
||||
status: {
|
||||
loading: false,
|
||||
value: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -38,6 +38,10 @@ export type InstanceV10 = {
|
|||
loading: boolean
|
||||
value: Mastodon.PushSubscription['alerts']['follow']
|
||||
}
|
||||
follow_request: {
|
||||
loading: boolean
|
||||
value: Mastodon.PushSubscription['alerts']['follow_request']
|
||||
}
|
||||
favourite: {
|
||||
loading: boolean
|
||||
value: Mastodon.PushSubscription['alerts']['favourite']
|
||||
|
@ -54,6 +58,10 @@ export type InstanceV10 = {
|
|||
loading: boolean
|
||||
value: Mastodon.PushSubscription['alerts']['poll']
|
||||
}
|
||||
status: {
|
||||
loading: boolean
|
||||
value: Mastodon.PushSubscription['alerts']['status']
|
||||
}
|
||||
}
|
||||
keys: {
|
||||
auth?: string
|
||||
|
|
|
@ -94,10 +94,12 @@ const addInstance = createAsyncThunk(
|
|||
decode: { loading: false, value: false },
|
||||
alerts: {
|
||||
follow: { loading: false, value: true },
|
||||
follow_request: { loading: false, value: true },
|
||||
favourite: { loading: false, value: true },
|
||||
reblog: { loading: false, value: true },
|
||||
mention: { loading: false, value: true },
|
||||
poll: { loading: false, value: true }
|
||||
poll: { loading: false, value: true },
|
||||
status: { loading: false, value: true }
|
||||
},
|
||||
keys: { auth: undefined, public: undefined, private: undefined }
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue