From 63eac315a98aa1c3dc6f1c08fe379ef171f1bd64 Mon Sep 17 00:00:00 2001 From: Ginsu Eddy Date: Wed, 5 Jul 2023 16:36:08 -0400 Subject: [PATCH] [native] remove unnecessary async/await in emoji keyboard Summary: Small follow up diff to address comments in D8282 Test Plan: confirmed that the recently selected emoji persistence behavior still worked as expected Reviewers: kamil, atul Reviewed By: kamil Subscribers: ashoat, tomek Differential Revision: https://phab.comm.dev/D8409 --- native/components/emoji-keyboard.react.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/native/components/emoji-keyboard.react.js b/native/components/emoji-keyboard.react.js index feb6f1f78f..77a8f13ba6 100644 --- a/native/components/emoji-keyboard.react.js +++ b/native/components/emoji-keyboard.react.js @@ -31,12 +31,8 @@ const initializationCallback = async () => { return JSON.parse(recentlyUsedEmojis ?? '[]'); }; -const onStateChangeCallback = async nextRecentlyUsedEmojis => { - await AsyncStorage.setItem( - STORAGE_KEY, - JSON.stringify(nextRecentlyUsedEmojis), - ); -}; +const onStateChangeCallback = nextRecentlyUsedEmojis => + AsyncStorage.setItem(STORAGE_KEY, JSON.stringify(nextRecentlyUsedEmojis)); const useRecentPicksPersistenceArgs = { initialization: initializationCallback,