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

Fix modals

This commit is contained in:
Zhiyuan Zheng
2021-05-12 22:45:51 +02:00
parent 8e0d499ed8
commit 87343989cf
14 changed files with 361 additions and 442 deletions

View File

@ -1,7 +1,7 @@
import apiGeneral from '@api/general'
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'
import { RootState } from '@root/store'
import apiGeneral from '@api/general'
import { Constants } from 'react-native-unimodules'
import * as Updates from 'expo-updates'
export const retriveVersionLatest = createAsyncThunk(
'version/latest',
@ -29,8 +29,10 @@ const versionSlice = createSlice({
reducers: {},
extraReducers: builder => {
builder.addCase(retriveVersionLatest.fulfilled, (state, action) => {
if (action.payload && Constants.manifest.version) {
if (parseInt(action.payload) > parseInt(Constants.manifest.version)) {
// @ts-ignore
if (action.payload && Updates.manifest?.version) {
// @ts-ignore
if (parseInt(action.payload) > parseInt(Updates.manifest.version)) {
state.update = true
}
}