1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Using EAS update

This commit is contained in:
xmflsct
2022-08-16 22:39:54 +02:00
parent d0bdb08bbe
commit 70c90b6a47
15 changed files with 40 additions and 44 deletions

View File

@ -36,14 +36,14 @@ const mapEnvironment = <T = unknown>({
const isDevelopment =
__DEV__ ||
['development'].some(channel => Updates.releaseChannel.includes(channel))
['development'].some(channel => Updates.channel === channel)
const isCandidate = ['candidate'].some(channel =>
Updates.releaseChannel.includes(channel)
Updates.channel === channel
)
const isRelease = ['release'].some(channel =>
Updates.releaseChannel.includes(channel)
Updates.channel === channel
)
export { mapEnvironment, isDevelopment, isCandidate, isRelease }

View File

@ -54,9 +54,9 @@ const appSlice = createSlice({
}
})
.addCase(retriveVersionLatest.fulfilled, (state, action) => {
if (action.payload && Constants.manifest?.version) {
if (action.payload && Constants.expoConfig?.version) {
if (
parseFloat(action.payload) > parseFloat(Constants.manifest.version)
parseFloat(action.payload) > parseFloat(Constants.expoConfig?.version)
) {
state.versionUpdate = true
}

View File

@ -38,7 +38,7 @@ const contextsSlice = createSlice({
initialState: contextsInitialState as ContextsState,
reducers: {
updateStoreReview: (state, action: PayloadAction<1>) => {
if (Updates.releaseChannel.includes('release')) {
if (Updates.channel === 'release') {
state.storeReview.current = state.storeReview.current + action.payload
if (state.storeReview.current === state.storeReview.context) {
StoreReview?.isAvailableAsync().then(() =>