This repository has been archived by the owner on Jun 30, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[NEW] Introduce
clearLocalStorageWhenChatEnded
setting logic #666[NEW] Introduce
clearLocalStorageWhenChatEnded
setting logic #666Changes from 1 commit
95f46f5
84c6640
7231db8
909197d
0a6db78
01cc8c7
6e84db1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Just set
{}
as _state is not enough because this way thetoken
field value won't be recreated, and this is an issue, if you start a new chat and then refresh the page, the chat history is gone.That's the reason we need to "reset" the default state, the same we do when the local storage is created as you can see here:
Rocket.Chat.Livechat/src/store/index.js
Lines 7 to 39 in 0b50f73
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.
Hey @renatobecker , can you take a look again?
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 works like a charm now, but we should not change the following fields as they impact UI/UX.
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.
Changes done!
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.
LGTM, but please check this comment