mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Fix UI losing view as mode after updating doc sharing
Summary: Fix issue where the view-as banner disappears when saving changes on the User Manager panel while view-as mode was ON. Test Plan: Updates nbrowser test Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D3754
This commit is contained in:
parent
d107810127
commit
8227be513c
@ -211,7 +211,9 @@ export class DocPageModelImpl extends Disposable implements DocPageModel {
|
||||
public async updateCurrentDoc(urlId: string, openMode: OpenDocMode) {
|
||||
// TODO It would be bad if a new doc gets opened while this getDoc() is pending...
|
||||
const newDoc = await getDoc(this._api, urlId);
|
||||
this.currentDoc.set(buildDocInfo(newDoc, openMode));
|
||||
const isRecoveryMode = Boolean(this.currentDoc.get()?.isRecoveryMode);
|
||||
const userOverride = this.currentDoc.get()?.userOverride || null;
|
||||
this.currentDoc.set({...buildDocInfo(newDoc, openMode), isRecoveryMode, userOverride});
|
||||
return newDoc;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user