Reload change after submit
For some submit strategies, the change should be reloaded with the
latest patch set after submission. With this change, the view is
reloaded after every submit for simplicity's sake.
Bug: Issue 9586
Change-Id: Ic194642e427c60d89713bde913f992bafe3e811d
(cherry picked from commit 10382768888cbaed57920539a3d31d0e370e0e81)
diff --git a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js
index 001f32c..1f050ba 100644
--- a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js
+++ b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js
@@ -885,9 +885,10 @@
_handleReloadChange(e) {
return this._reload().then(() => {
- // If the change was rebased, we need to reload the page with the
- // latest patch.
- if (e.detail.action === 'rebase') {
+ // If the change was rebased or submitted, we need to reload the page
+ // with the latest patch.
+ const action = e.detail.action;
+ if (action === 'rebase' || action === 'submit') {
Gerrit.Nav.navigateToChange(this._change);
}
});