Merge branch 'release'

This commit is contained in:
Zhiyuan Zheng 2022-06-06 22:50:23 +02:00
commit 23bc9aa5f3
2 changed files with 3 additions and 4 deletions

View File

@ -25,10 +25,9 @@ jobs:
distribution: 'zulu' distribution: 'zulu'
java-version: '11' java-version: '11'
- name: -- Step 4 -- Use Expo action - name: -- Step 4 -- Use Expo action
uses: expo/expo-github-action@v6 uses: expo/expo-github-action@v7
with: with:
expo-version: 5.x expo-version: latest
username: ${{ secrets.EXPO_USERNAME }}
token: ${{ secrets.EXPO_TOKEN }} token: ${{ secrets.EXPO_TOKEN }}
- name: -- Step 5 -- Install node dependencies - name: -- Step 5 -- Install node dependencies
run: yarn install run: yarn install

View File

@ -78,7 +78,6 @@ const pushUseConnect = ({ t, instances }: Params) => {
useEffect(() => { useEffect(() => {
const appStateListener = AppState.addEventListener('change', state => { const appStateListener = AppState.addEventListener('change', state => {
console.log('changing state to', state)
if (expoToken && pushEnabled.length && state === 'active') { if (expoToken && pushEnabled.length && state === 'active') {
Notifications.getBadgeCountAsync().then(count => { Notifications.getBadgeCountAsync().then(count => {
if (count > 0) { if (count > 0) {
@ -96,6 +95,7 @@ const pushUseConnect = ({ t, instances }: Params) => {
return useEffect(() => { return useEffect(() => {
if (expoToken && pushEnabled.length) { if (expoToken && pushEnabled.length) {
Notifications.setBadgeCountAsync(0)
connect() connect()
} }
}, [expoToken, pushEnabled.length]) }, [expoToken, pushEnabled.length])