mirror of
https://github.com/tooot-app/app
synced 2025-05-10 06:49:03 +02:00
Auth follow update
This commit is contained in:
parent
d23f454148
commit
546847fd9a
@ -1,11 +1,11 @@
|
|||||||
import { useNavigation } from '@react-navigation/native'
|
import { useNavigation } from '@react-navigation/native'
|
||||||
import { TabMeStackNavigationProp } from '@utils/navigation/navigators'
|
import { TabMeStackNavigationProp } from '@utils/navigation/navigators'
|
||||||
import addInstance from '@utils/slices/instances/add'
|
import addInstance from '@utils/slices/instances/add'
|
||||||
import { Instance } from '@utils/slices/instancesSlice'
|
import { checkInstanceFeature, Instance } from '@utils/slices/instancesSlice'
|
||||||
import * as AuthSession from 'expo-auth-session'
|
import * as AuthSession from 'expo-auth-session'
|
||||||
import React, { useEffect } from 'react'
|
import React, { useEffect } from 'react'
|
||||||
import { useQueryClient } from 'react-query'
|
import { useQueryClient } from 'react-query'
|
||||||
import { useDispatch } from 'react-redux'
|
import { useDispatch, useSelector } from 'react-redux'
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
instanceDomain: string
|
instanceDomain: string
|
||||||
@ -27,11 +27,16 @@ const InstanceAuth = React.memo(
|
|||||||
const queryClient = useQueryClient()
|
const queryClient = useQueryClient()
|
||||||
const dispatch = useDispatch()
|
const dispatch = useDispatch()
|
||||||
|
|
||||||
|
const deprecateAuthFollow = useSelector(
|
||||||
|
checkInstanceFeature('deprecate_auth_follow')
|
||||||
|
)
|
||||||
const [request, response, promptAsync] = AuthSession.useAuthRequest(
|
const [request, response, promptAsync] = AuthSession.useAuthRequest(
|
||||||
{
|
{
|
||||||
clientId: appData.clientId,
|
clientId: appData.clientId,
|
||||||
clientSecret: appData.clientSecret,
|
clientSecret: appData.clientSecret,
|
||||||
scopes: ['read', 'write', 'follow', 'push'],
|
scopes: deprecateAuthFollow
|
||||||
|
? ['read', 'write', 'push']
|
||||||
|
: ['read', 'write', 'follow', 'push'],
|
||||||
redirectUri
|
redirectUri
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -35,7 +35,7 @@ const TimelineFeedback = React.memo(
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
||||||
<View>
|
<View style={{ flexDirection: 'row' }}>
|
||||||
{status.reblogs_count > 0 ? (
|
{status.reblogs_count > 0 ? (
|
||||||
<Text
|
<Text
|
||||||
accessibilityLabel={t(
|
accessibilityLabel={t(
|
||||||
|
@ -3,5 +3,10 @@
|
|||||||
"feature": "edit_post",
|
"feature": "edit_post",
|
||||||
"version": 3.5,
|
"version": 3.5,
|
||||||
"reference": "https://github.com/mastodon/mastodon/releases/tag/v3.5.0"
|
"reference": "https://github.com/mastodon/mastodon/releases/tag/v3.5.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"feature": "deprecate_auth_follow",
|
||||||
|
"version": 3.5,
|
||||||
|
"reference": "https://github.com/mastodon/mastodon/releases/tag/v3.5.0"
|
||||||
}
|
}
|
||||||
]
|
]
|
Loading…
x
Reference in New Issue
Block a user