-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat: save default target language & set detect_language as origin default #167
Conversation
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.
Recommendation for the delay issue.
}) | ||
this.taskTypes = taskTypes | ||
|
||
this.getLastTargetLanguage() |
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.
It would probably work to call this asynchronously and change the task type (in this.taskTypes
) once you get the answer.
It would mean keeping the previous code (taskTypes.forEach
and then this.taskTypes = taskTypes
) and then doing the this.getLastTargetLanguage().then(r => // find and change the task type in this.taskTypes)
This would solve the delay issue as the taskTypes
data prop would be set as soon as possible. It would not be slowed down by this.getLastTargetLanguage()
.
…default Signed-off-by: Jana Peper <[email protected]>
…the standalone page Signed-off-by: Julien Veyssier <[email protected]>
Signed-off-by: Julien Veyssier <[email protected]>
305e12e
to
8d2c550
Compare
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.
Added a small fix and switched to using initial state + an OCA.Assistant variable to handle the last target language.
This adds a short loading time before task types will be shown in the assistant modal. Ideas how to prevent that very welcome :)