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 1038276888)
This commit is contained in:
Kasper Nilsson
2018-09-27 12:06:50 -07:00
committed by Gert van Dijk
parent 8af72e6657
commit ac8d234d4e

View File

@@ -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);
}
});