Open chaitanya71998 opened 2 years ago
Hi @chaitanya71998 ,
Do you want to hide only the composer or minimize the whole bot?
Hi @bassamtantawi-botpress yeah wanted to hide composer
The conditions are used to make sure that if the chat is restored (user opens and closes window), and there are more than one component in the message list, just the one from the last group gets executed (race condition). This is due to the component executes code onMount.
We aren't sure why it's not working for you sometimes. You might want to put a bunch of console.logs and try it out with different screen sizes in your browser. If the problem only happens on mobile, you can create an api endpoint using https://requestbin.com/ and call the endpoint when the state changes in the component. If you manage to write code that reproduces the issue reliably, let us know.
Hi @ptrckbp can you explain more clearly i didn't understand the use of condition, will it cause problem if we remove conditions?
The conditions are used to prevent a race condition, so if you remove them, you will occasionally encounter issues. Are they the ones causing issues with mobile?
No, before removing condition this issue is coming.
Greetings, I was using hide-chat in a botpress project. I created a flow to make composer hide and should be visible only when required. Sometimes its working fine but and not working sometimes, especially when I am using for mobiles. Not knowing why is this happening. Can I know what is the issue here and how to solve it
here is the link to the flow I created with hide-chat module https://drive.google.com/drive/folders/1a1uCL-gvzlbgWwnpfg8qZmKWVJtr366Y?usp=sharing
also what are these conditions
isBotMessage && isLastGroup
we are using for, can we remove these conditions, if removed will they cause any issue?Thanks in advance