Create the initialState in a single location#3403
Conversation
danxuliu
left a comment
There was a problem hiding this comment.
Tested and works 👍
I have added a fixup to remove a redundant try/catch and another one to fix passing null to provideInitialState, as it is not supported.
Additionally I have fixed the attachment folder not taken into account in the Talk sidebar in the Files app, as the value returned from the initial state was not being used.
This should fix the attachment folder too when uploading a file as a user in the Talk sidebar of a public share or the video verification. However, the public share sets the user in incognito mode, so when the TemplateLoader is executed no user is returned so publishInitialStateForUser can not be called. @nickvergessen If you know how to fix that easily for this pull request, cool, but if not I am OK with fixing it at a later point.
Signed-off-by: Joas Schilling <coding@schilljs.com>
The attachment folder was set when the left sidebar was loaded. That component is loaded only in the main Talk UI, so the attachment folder provided in the initial state was ignored in the Talk sidebars. Now the initial state for the attachment folder is used by default in the store, so it applies everywhere. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
9652aed to
f3f104a
Compare
|
/backport to stable18 |
|
The backport to stable18 failed. Please do this backport manually. |
|
Backport in #3421 |
Fixes #3244
Extracted from #3292