mirror of
				https://github.com/tooot-app/app
				synced 2025-06-05 22:19:13 +02:00 
			
		
		
		
	Fix push token not updated
This commit is contained in:
		| @@ -1,6 +1,6 @@ | |||||||
| { | { | ||||||
|   "name": "tooot", |   "name": "tooot", | ||||||
|   "version": "4.9.0", |   "version": "4.9.1", | ||||||
|   "description": "tooot for Mastodon", |   "description": "tooot for Mastodon", | ||||||
|   "author": "xmflsct <me@xmflsct.com>", |   "author": "xmflsct <me@xmflsct.com>", | ||||||
|   "license": "GPL-3.0-or-later", |   "license": "GPL-3.0-or-later", | ||||||
|   | |||||||
| @@ -265,7 +265,7 @@ const Timeline: React.FC<Props> = ({ | |||||||
|         initialNumToRender={3} |         initialNumToRender={3} | ||||||
|         maxToRenderPerBatch={2} |         maxToRenderPerBatch={2} | ||||||
|         onEndReached={() => !disableInfinity && !isFetchingNextPage && fetchNextPage()} |         onEndReached={() => !disableInfinity && !isFetchingNextPage && fetchNextPage()} | ||||||
|         onEndReachedThreshold={0.75} |         onEndReachedThreshold={0.8} | ||||||
|         ListFooterComponent={ |         ListFooterComponent={ | ||||||
|           <TimelineFooter queryKey={queryKey} disableInfinity={disableInfinity} /> |           <TimelineFooter queryKey={queryKey} disableInfinity={disableInfinity} /> | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -11,20 +11,16 @@ export const updateExpoToken = async (): Promise<string> => { | |||||||
|     await setChannels() |     await setChannels() | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   if (expoToken?.length) { |   if (isDevelopment) { | ||||||
|     return Promise.resolve(expoToken) |     setGlobalStorage('app.expo_token', 'ExponentPushToken[DEVELOPMENT_1]') | ||||||
|   } else { |     return 'ExponentPushToken[DEVELOPMENT_1]' | ||||||
|     if (isDevelopment) { |  | ||||||
|       setGlobalStorage('app.expo_token', 'ExponentPushToken[DEVELOPMENT_1]') |  | ||||||
|       return Promise.resolve('ExponentPushToken[DEVELOPMENT_1]') |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     return await Notifications.getExpoPushTokenAsync({ |  | ||||||
|       experienceId: '@xmflsct/tooot', |  | ||||||
|       applicationId: 'com.xmflsct.app.tooot' |  | ||||||
|     }).then(({ data }) => { |  | ||||||
|       setGlobalStorage('app.expo_token', data) |  | ||||||
|       return data |  | ||||||
|     }) |  | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   return await Notifications.getExpoPushTokenAsync({ | ||||||
|  |     experienceId: '@xmflsct/tooot', | ||||||
|  |     applicationId: 'com.xmflsct.app.tooot' | ||||||
|  |   }).then(({ data }) => { | ||||||
|  |     setGlobalStorage('app.expo_token', data) | ||||||
|  |     return data | ||||||
|  |   }) | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user