mirror of
https://github.com/tooot-app/app
synced 2025-04-30 01:48:52 +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 { TabMeStackNavigationProp } from '@utils/navigation/navigators'
|
||||
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 React, { useEffect } from 'react'
|
||||
import { useQueryClient } from 'react-query'
|
||||
import { useDispatch } from 'react-redux'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
|
||||
export interface Props {
|
||||
instanceDomain: string
|
||||
@ -27,11 +27,16 @@ const InstanceAuth = React.memo(
|
||||
const queryClient = useQueryClient()
|
||||
const dispatch = useDispatch()
|
||||
|
||||
const deprecateAuthFollow = useSelector(
|
||||
checkInstanceFeature('deprecate_auth_follow')
|
||||
)
|
||||
const [request, response, promptAsync] = AuthSession.useAuthRequest(
|
||||
{
|
||||
clientId: appData.clientId,
|
||||
clientSecret: appData.clientSecret,
|
||||
scopes: ['read', 'write', 'follow', 'push'],
|
||||
scopes: deprecateAuthFollow
|
||||
? ['read', 'write', 'push']
|
||||
: ['read', 'write', 'follow', 'push'],
|
||||
redirectUri
|
||||
},
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ const TimelineFeedback = React.memo(
|
||||
|
||||
return (
|
||||
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
||||
<View>
|
||||
<View style={{ flexDirection: 'row' }}>
|
||||
{status.reblogs_count > 0 ? (
|
||||
<Text
|
||||
accessibilityLabel={t(
|
||||
|
@ -3,5 +3,10 @@
|
||||
"feature": "edit_post",
|
||||
"version": 3.5,
|
||||
"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