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