Skip to content

Commit

Permalink
[native] remove unnecessary async/await in emoji keyboard
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ginsueddy committed Jul 5, 2023
1 parent c0a906c commit 63eac31
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions native/components/emoji-keyboard.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 63eac31

Please sign in to comment.