mirror of
https://github.com/tooot-app/app
synced 2024-12-26 17:32:26 +01:00
Prepare for apk test
This commit is contained in:
parent
74d830a71a
commit
8451d5a565
2
.github/workflows/testing.yml
vendored
2
.github/workflows/testing.yml
vendored
@ -5,7 +5,7 @@ on:
|
||||
- testing
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: macos-latest
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: -- Step 1 -- Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
@ -17,6 +17,7 @@ export default (): ExpoConfig => ({
|
||||
},
|
||||
scheme: 'tooot',
|
||||
ios: {
|
||||
buildNumber: '0.1.0',
|
||||
bundleIdentifier: 'com.xmflsct.app.tooot',
|
||||
googleServicesFile: './configs/GoogleService-Info.plist',
|
||||
infoPlist: {
|
||||
@ -24,6 +25,7 @@ export default (): ExpoConfig => ({
|
||||
}
|
||||
},
|
||||
android: {
|
||||
versionCode: 0.1,
|
||||
package: 'com.xmflsct.app.tooot',
|
||||
googleServicesFile: './configs/google-services.json',
|
||||
permissions: ['CAMERA', 'VIBRATE']
|
||||
|
@ -25,6 +25,7 @@
|
||||
"expo-auth-session": "~3.0.0",
|
||||
"expo-av": "~8.7.0",
|
||||
"expo-blur": "~8.2.2",
|
||||
"expo-constants": "~9.3.3",
|
||||
"expo-crypto": "~8.4.0",
|
||||
"expo-firebase-analytics": "~2.6.0",
|
||||
"expo-firebase-core": "~1.3.0",
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { useNavigation } from '@react-navigation/native'
|
||||
import { InstanceLocal, localAddInstance } from '@utils/slices/instancesSlice'
|
||||
import * as AuthSession from 'expo-auth-session'
|
||||
import Constants from 'expo-constants'
|
||||
import React, { useEffect } from 'react'
|
||||
import { useQueryClient } from 'react-query'
|
||||
import { useDispatch } from 'react-redux'
|
||||
@ -13,6 +14,18 @@ export interface Props {
|
||||
|
||||
const InstanceAuth = React.memo(
|
||||
({ instanceDomain, appData, goBack }: Props) => {
|
||||
console.log(Constants.manifest.releaseChannel)
|
||||
let redirectUri: string
|
||||
switch (Constants.manifest.releaseChannel) {
|
||||
case 'production':
|
||||
case 'staging':
|
||||
case 'testing':
|
||||
redirectUri = 'tooot://expo-auth-session'
|
||||
break
|
||||
default:
|
||||
redirectUri = 'exp://127.0.0.1:19000'
|
||||
break
|
||||
}
|
||||
const navigation = useNavigation()
|
||||
const queryClient = useQueryClient()
|
||||
const dispatch = useDispatch()
|
||||
@ -22,7 +35,7 @@ const InstanceAuth = React.memo(
|
||||
clientId: appData.clientId,
|
||||
clientSecret: appData.clientSecret,
|
||||
scopes: ['read', 'write', 'follow', 'push'],
|
||||
redirectUri: 'exp://127.0.0.1:19000'
|
||||
redirectUri
|
||||
},
|
||||
{
|
||||
authorizationEndpoint: `https://${instanceDomain}/oauth/authorize`
|
||||
@ -43,7 +56,7 @@ const InstanceAuth = React.memo(
|
||||
clientId: appData.clientId,
|
||||
clientSecret: appData.clientSecret,
|
||||
scopes: ['read', 'write', 'follow', 'push'],
|
||||
redirectUri: 'exp://127.0.0.1:19000',
|
||||
redirectUri,
|
||||
code: response.params.code,
|
||||
extraParams: {
|
||||
grant_type: 'authorization_code'
|
||||
|
@ -165,22 +165,16 @@ const Timeline: React.FC<Props> = ({
|
||||
)
|
||||
|
||||
const queryClient = useQueryClient()
|
||||
const refreshCount = useRef(0)
|
||||
const refreshControl = useMemo(
|
||||
() => (
|
||||
<RefreshControl
|
||||
{...(Platform.OS === 'android' && { enabled: true })}
|
||||
refreshing={
|
||||
refreshCount.current < 2
|
||||
? Platform.OS === 'ios'
|
||||
? isFetchingPreviousPage
|
||||
: isFetchingPreviousPage || isFetching
|
||||
: isFetching
|
||||
isFetchingPreviousPage || (isFetching && !isFetchingNextPage)
|
||||
}
|
||||
onRefresh={async () => {
|
||||
if (refreshCount.current < 2) {
|
||||
await fetchPreviousPage()
|
||||
refreshCount.current++
|
||||
onRefresh={() => {
|
||||
if (hasPreviousPage) {
|
||||
fetchPreviousPage()
|
||||
} else {
|
||||
queryClient.setQueryData<InfiniteData<any> | undefined>(
|
||||
queryKey,
|
||||
@ -193,13 +187,12 @@ const Timeline: React.FC<Props> = ({
|
||||
}
|
||||
}
|
||||
)
|
||||
await refetch()
|
||||
refreshCount.current = 0
|
||||
refetch()
|
||||
}
|
||||
}}
|
||||
/>
|
||||
),
|
||||
[isFetchingPreviousPage, isFetching]
|
||||
[hasPreviousPage, isFetchingPreviousPage, isFetching, isFetchingNextPage]
|
||||
)
|
||||
const onScrollToIndexFailed = useCallback(error => {
|
||||
const offset = error.averageItemLength * error.index
|
||||
|
@ -1,14 +1,14 @@
|
||||
import Button from '@components/Button'
|
||||
import haptics from '@components/haptics'
|
||||
import { MenuContainer, MenuRow } from '@components/Menu'
|
||||
import { useActionSheet } from '@expo/react-native-action-sheet'
|
||||
import { useNavigation } from '@react-navigation/native'
|
||||
import haptics from '@root/components/haptics'
|
||||
import { persistor } from '@root/store'
|
||||
import {
|
||||
getLocalActiveIndex,
|
||||
getLocalInstances,
|
||||
getRemoteUrl
|
||||
} from '@root/utils/slices/instancesSlice'
|
||||
} from '@utils/slices/instancesSlice'
|
||||
import {
|
||||
changeAnalytics,
|
||||
changeBrowser,
|
||||
@ -21,6 +21,7 @@ import {
|
||||
} from '@utils/slices/settingsSlice'
|
||||
import { StyleConstants } from '@utils/styles/constants'
|
||||
import { useTheme } from '@utils/styles/ThemeManager'
|
||||
import Constants from 'expo-constants'
|
||||
import prettyBytes from 'pretty-bytes'
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
@ -232,7 +233,9 @@ const ScreenMeSettings: React.FC = () => {
|
||||
</Text>
|
||||
</MenuContainer>
|
||||
|
||||
{__DEV__ ? <DevDebug /> : null}
|
||||
{__DEV__ || Constants.manifest.releaseChannel === 'testing' ? (
|
||||
<DevDebug />
|
||||
) : null}
|
||||
</ScrollView>
|
||||
)
|
||||
}
|
||||
|
@ -2152,7 +2152,7 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.166.tgz#07e7f2699a149219dbc3c35574f126ec8737688f"
|
||||
integrity sha512-A3YT/c1oTlyvvW/GQqG86EyqWNrT/tisOIh2mW3YCgcx71TNjiTZA3zYZWA5BCmtsOTXjhliy4c4yEkErw6njA==
|
||||
|
||||
"@types/node@*", "@types/node@^14.14.7":
|
||||
"@types/node@*":
|
||||
version "14.14.16"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.16.tgz#3cc351f8d48101deadfed4c9e4f116048d437b4b"
|
||||
integrity sha512-naXYePhweTi+BMv11TgioE2/FXU4fSl29HAH1ffxVciNsH3rYXjNP2yM8wqmSm7jS20gM8TIklKiTen+1iVncw==
|
||||
|
Loading…
Reference in New Issue
Block a user