Skip to content

Commit

Permalink
Update useEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
rygine committed Mar 1, 2024
1 parent eb86ed4 commit 94fa97f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/controllers/ConversationListController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,17 @@ export const ConversationListController = ({

useStreamAllMessages();
const recipientInput = useXmtpStore((s) => s.recipientInput);
const changedConsentCount = useXmtpStore((s) => s.changedConsentCount);
const activeTab = useXmtpStore((s) => s.activeTab);

// when the conversations are loaded, update their identities
useEffect(() => {
const runUpdate = async () => {
if (isLoaded) {
await updateConversationIdentities(conversations, db);
await updateConversationIdentities(activeConversations, db);
}
};
void runUpdate();
}, [isLoaded, activeTab, changedConsentCount, conversations, db]);
}, [activeConversations, db, isLoaded]);

useEffect(() => {
const getActiveConversations = async () => {
Expand Down

0 comments on commit 94fa97f

Please sign in to comment.