summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKasper Nilsson <kaspern@google.com>2018-09-27 12:06:50 -0700
committerKasper Nilsson <kaspern@google.com>2018-09-27 12:06:50 -0700
commit10382768888cbaed57920539a3d31d0e370e0e81 (patch)
treef48f607ed5a2c7ae22344cac9abc623d96afa984
parent63e82dbfa27c031575bf73d62d508e38ae278705 (diff)
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
-rw-r--r--polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js7
1 files changed, 4 insertions, 3 deletions
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 4d54161419..257a062358 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
@@ -1011,9 +1011,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);
}
});