gr-editor-view: call fireReload when saving and publish
This is to ensure that you don't recieve a "Not current"
or patch set isn't updated.
Release-Notes: skip
Change-Id: Id226dd941f5c9d4e33f710e5fde369e7830f01ed
diff --git a/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.ts b/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.ts
index 66019ef..878c5e9 100644
--- a/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.ts
+++ b/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.ts
@@ -17,7 +17,11 @@
} from '../../../types/common';
import {ParsedChangeInfo} from '../../../types/types';
import {HttpMethod, NotifyType} from '../../../constants/constants';
-import {fireAlert, fireTitleChange} from '../../../utils/event-util';
+import {
+ fireAlert,
+ fireTitleChange,
+ fireReload,
+} from '../../../utils/event-util';
import {getAppContext} from '../../../services/app-context';
import {ErrorCallback} from '../../../api/rest';
import {assertIsDefined} from '../../../utils/common-util';
@@ -508,6 +512,10 @@
)
.then(() => {
assertIsDefined(this.change, 'change');
+ // TODO: `forceReload: true` does not seem to work as expected: The patchset is not
+ // updated. Thus we are also calling `fireReload()` here. That can probably be
+ // cleaned up once the change-view was migrated to fully relying on the change model.
+ fireReload(this);
this.getNavigation().setUrl(
createChangeUrl({change: this.change, forceReload: true})
);