fixing bug with selecting for one on one and closing dialog
This commit is contained in:
@@ -115,7 +115,7 @@ export function ConversationProvider({ children }: { children: React.ReactNode }
|
|||||||
|
|
||||||
if (!otherUsers || otherUsers.length === 0) {
|
if (!otherUsers || otherUsers.length === 0) {
|
||||||
toast.error('Must provider users');
|
toast.error('Must provider users');
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: check to make sure that the other user is not the user himself, although backend should error out
|
// todo: check to make sure that the other user is not the user himself, although backend should error out
|
||||||
@@ -128,7 +128,7 @@ export function ConversationProvider({ children }: { children: React.ReactNode }
|
|||||||
toast.success('already have this user...quick dialing');
|
toast.success('already have this user...quick dialing');
|
||||||
|
|
||||||
selectConversation(conversationDmCheck.data, true);
|
selectConversation(conversationDmCheck.data, true);
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -99,9 +99,10 @@ export default function NewConversationDialog() {
|
|||||||
|
|
||||||
// clear form for next time
|
// clear form for next time
|
||||||
if (succeeded) {
|
if (succeeded) {
|
||||||
|
toast('succeeded');
|
||||||
setSelectedUsers([]);
|
setSelectedUsers([]);
|
||||||
setConversationName('');
|
setConversationName('');
|
||||||
handleSetPage('SELECTED_CONVERSATION');
|
handleSetPage('SELECTED_CONVERSATION')();
|
||||||
}
|
}
|
||||||
|
|
||||||
setIsSubmitting(false);
|
setIsSubmitting(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user