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:
@ -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 }
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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(() =>
|
||||
|
Reference in New Issue
Block a user