-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement prechat timer pop up #52
Conversation
|
||
if (popUpHtml) { | ||
this.elements.chatbotContainer.appendChild(popUpHtml); | ||
setTimeout(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tuseto
Can't you just use the delay function and omit the setTimeout?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can, but I don't want to. I even want to remove the delay function.
src/lib/helpers.js
Outdated
@@ -126,6 +126,11 @@ export const extractStringWithBrackets = (message) => { | |||
}; | |||
}; | |||
|
|||
export function removeTextBetweenHashtags(input) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tuseto
There is a function called "clearButtonCodes" in the action-service.js that does the same, maybe we can use move it here in the helpers.js and remove "removeTextBetweenHashtags".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the function into action-service, but cannot use the old one, they both are doing different things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was suppose to be the other way around, use the already existing function in the from the action service called (clearButtonCodes) and move it into helpers.js and then remove the function you wrote.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't clear all codes before the message is loaded (when all codes are cleared). It will result in more changes.
No description provided.