Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Commit

Permalink
bump expo sdk version to 42
Browse files Browse the repository at this point in the history
  • Loading branch information
hueyy committed Jul 5, 2021
1 parent c727d54 commit f77c0d1
Show file tree
Hide file tree
Showing 16 changed files with 12,064 additions and 12,724 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2-beta
with:
node-version: 12
- uses: actions/cache@v2.2.0
node-version: 14
- uses: actions/cache@v2.1.6
with:
path: |
~/.npm
Expand All @@ -23,7 +23,7 @@ jobs:
restore-keys: |
${{ runner.os }}-node-
- name: Expo GitHub Action
uses: expo/expo-github-action@v6.0.0
uses: expo/expo-github-action@6.0.0
with:
token: ${{ secrets.EXPO_CLI_TOKEN }}
expo-cache: true
Expand All @@ -45,7 +45,7 @@ jobs:
if: github.ref != 'refs/heads/master'
run: |
expo publish --release-channel=dev.commit-${{ github.sha }}
- uses: unsplash/comment-on-pr@main
- uses: unsplash/comment-on-pr@master
if: github.ref != 'refs/heads/master' # don't try to comment on master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
7 changes: 4 additions & 3 deletions configureStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ const appReducer = combineReducers({
...otherReducers,
})

export type AppStateType = ReturnType<typeof appReducer>

const rootReducer = (state, action) => appReducer(
action.type === SIGN_OUT_USER ? undefined : state, action,
)
Expand All @@ -48,9 +46,12 @@ const persistRootReducer = persistReducer(config, rootReducer)

const store = createStore(
persistRootReducer,
initialState,
initialState as unknown,
applyMiddleware(...middleware),
)

export type AppStateType = ReturnType<typeof store.getState>

const persistor = persistStore(store)

export default { persistor, store }
2 changes: 1 addition & 1 deletion lib/MapsManager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Linking } from "react-native"
import * as Linking from 'expo-linking'

const navigateToCoords = ({ lat, lng }): void => {
const url = `https://www.google.com/maps/search/?api=1&query=${lat},${lng}`
Expand Down
9 changes: 3 additions & 6 deletions lib/PushNotificationsManager.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import axios from "axios"
import Constants from "expo-constants"
import * as Notifications from "expo-notifications"
import * as Permissions from "expo-permissions"

import { ASSISTANT_API_URL } from "../constants/API"
import AnalyticsManager from "./AnalyticsManager"
Expand All @@ -16,16 +15,14 @@ const registerForPushNotifications = async (token: string): Promise<string> => {
return ``
}

const { status: existingStatus } = await Permissions.getAsync(
Permissions.NOTIFICATIONS,
)
const { status: existingStatus } = await Notifications.getPermissionsAsync()

let finalStatus = existingStatus

// only ask if permissions have not already been determined, because
// iOS won't necessarily prompt the user a second time.
if (existingStatus !== `granted`) {
const { status } = await Permissions.askAsync(Permissions.NOTIFICATIONS)
const { status } = await Notifications.getPermissionsAsync()
finalStatus = status
}

Expand Down Expand Up @@ -78,7 +75,7 @@ const registerForPushNotifications = async (token: string): Promise<string> => {
const hasPushNotificationPermissions = async (): Promise<boolean> => {
let result
try {
result = await Permissions.getAsync(Permissions.NOTIFICATIONS)
result = await Notifications.getPermissionsAsync()
} catch (error) {
ErrorManager.captureError(error)
throw new Error(`Failed to check if push notifications permissions granted`)
Expand Down
Loading

0 comments on commit f77c0d1

Please sign in to comment.