Skip to content

Commit

Permalink
fix: scroll to bottom, loading the feed without message (#910)
Browse files Browse the repository at this point in the history
* fix: scroll to bottom, loading the feed without message, socket for chat

* fix: changes pushed

* fix: scroll isse

* fix: minor change
  • Loading branch information
pritipsingh authored Dec 1, 2023
1 parent ca2135c commit 0393cdf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const ChatViewComponentTest = () => {

<ChatView
onVerificationFail={() => console.log("BOIIII RETURNNNSSSSS")}
chatId='4ac5ab85c9c3d57adbdf2dba79357e56b2f9ef0256befe750d9f93af78d2ca68'
chatId='0x99A08ac6254dcf7ccc37CeC662aeba8eFA666666'
limit={10}
isConnected={true}
groupInfoModalBackground={MODAL_BACKGROUND_TYPE.OVERLAY}
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/sdk-frontend-react/src/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ const checkForWeb3Data = ({

export function App() {
const { account, library, active, chainId } = useWeb3React();
const [env, setEnv] = useState<ENV>(ENV.DEV);
const [env, setEnv] = useState<ENV>(ENV.PROD);
const [isCAIP, setIsCAIP] = useState(false);
const [signer, setSigner] = useState();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ export const ChatViewList: React.FC<IChatViewListProps> = (
await getMessagesCall();
})();
}
}, [conversationHash, pgpPrivateKey, account, env,chatFeed]);
}, [conversationHash, pgpPrivateKey, account, env,chatFeed, chatId]);

useEffect(() => {
scrollToBottom();
}, [conversationHash]);
}, [conversationHash, account, env, chatId, pgpPrivateKey, chatFeed]);

useEffect(() => {
if (
Expand Down Expand Up @@ -387,7 +387,7 @@ export const ChatViewList: React.FC<IChatViewListProps> = (
}
)}
</Section>
{chatFeed &&
{!!Object.keys(chatFeed || {}).length &&
account &&
checkIfIntent({
chat: chatFeed as IFeeds,
Expand Down
2 changes: 1 addition & 1 deletion packages/uiweb/src/lib/hooks/chat/usePushChatSocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const {fetchChatProfile} = useGetChatProfile();
pgpPrivateKey: pgpPrivateKey,
env: env,
});

if (response && response.length) {
setMessagesSinceLastConnection(response[0]);
}
Expand Down

0 comments on commit 0393cdf

Please sign in to comment.