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
(cherry picked from commit e5768609239415c9983572b32a7cf6c9175ac77c)
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 8bed2a2..804d5ea 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';
@@ -484,6 +488,12 @@
)
.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})
);