aboutsummaryrefslogtreecommitdiff
path: root/src/routes/Routes.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-03-02 16:25:49 -0500
committerIvan Chen <ivan@tagg.id>2021-03-02 16:25:49 -0500
commitf14a3582e6b8dc19573b48b035fe31c560dac77a (patch)
tree5cf5a488485fe314538a33426d59d4ce4c270829 /src/routes/Routes.tsx
parent791a3a7008cbd861ab1cf1b643d95d3555b3676b (diff)
renamed and changed logic to check for multiple versions
Diffstat (limited to 'src/routes/Routes.tsx')
-rw-r--r--src/routes/Routes.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/routes/Routes.tsx b/src/routes/Routes.tsx
index 1cbc9bc5..01ffacab 100644
--- a/src/routes/Routes.tsx
+++ b/src/routes/Routes.tsx
@@ -3,7 +3,7 @@ import React, {useEffect, useState} from 'react';
import DeviceInfo from 'react-native-device-info';
import SplashScreen from 'react-native-splash-screen';
import {useDispatch, useSelector} from 'react-redux';
-import {fcmService, getLiveVersion} from '../services';
+import {fcmService, getCurrentLiveVersions} from '../services';
import {
updateNewNotificationReceived,
updateNewVersionAvailable,
@@ -54,8 +54,8 @@ const Routes: React.FC = () => {
useEffect(() => {
const checkVersion = async () => {
- const liveVersion = await getLiveVersion();
- if (liveVersion && liveVersion !== DeviceInfo.getVersion()) {
+ const liveVersions = await getCurrentLiveVersions();
+ if (liveVersions.includes(DeviceInfo.getVersion())) {
setNewVersionAvailable(true);
dispatch(updateNewVersionAvailable(true));
}