Fix SEND_REPLY timer.
We do change-loading directly in the reply-dialog so we can terminate the timer there as well.
Release-Notes: skip
Change-Id: I0e335c131f05c3d711495cab803f813b804392dc
diff --git a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts
index fa44e18..9225ce8 100644
--- a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts
+++ b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts
@@ -1446,6 +1446,8 @@
if (this.patchsetLevelGrComment) {
this.patchsetLevelGrComment.disableAutoSaving = false;
}
+ // By this point in time the change has loaded, we're only waiting for the comments.
+ this.reporting.timeEnd(Timing.SEND_REPLY);
});
}
diff --git a/polygerrit-ui/app/models/change/change-model.ts b/polygerrit-ui/app/models/change/change-model.ts
index af69063..acae8ad 100644
--- a/polygerrit-ui/app/models/change/change-model.ts
+++ b/polygerrit-ui/app/models/change/change-model.ts
@@ -369,7 +369,6 @@
this.setDiffTitle(),
this.setEditTitle(),
this.reportChangeReload(),
- this.reportSendReply(),
this.fireShowChange(),
this.refuseEditForOpenChange(),
this.refuseEditForClosedChange(),
@@ -384,16 +383,6 @@
];
}
- private reportSendReply() {
- return this.changeLoadingStatus$.subscribe(loadingStatus => {
- // We are ending the timer on each change load, because ending a timer
- // that was not started is a no-op. :-)
- if (loadingStatus === LoadingStatus.LOADED) {
- this.reporting.timeEnd(Timing.SEND_REPLY);
- }
- });
- }
-
private reportChangeReload() {
return this.changeLoadingStatus$.subscribe(loadingStatus => {
if (