commit 082509087ca69801438a857cf36a8ffd94140231 Author: Dhruv Srivastava Date: Wed Oct 14 12:32:34 2020 +0200 Fix argument type for dispatchEventThroughTarget Change-Id: Ied4b6042b68a328235ffec74c29762679303468b diff --git a/polygerrit-ui/app/elements/shared/gr-hovercard-account/gr-hovercard-account.ts b/polygerrit-ui/app/elements/shared/gr-hovercard-account/gr-hovercard-account.ts index 0eddbc0..da2881e 100644 --- a/polygerrit-ui/app/elements/shared/gr-hovercard-account/gr-hovercard-account.ts +++ b/polygerrit-ui/app/elements/shared/gr-hovercard-account/gr-hovercard-account.ts @@ -172,9 +172,7 @@ export class GrHovercardAccount extends GestureEventListeners( // we want to check before showing reloading toast const _accountKey = accountKey(this.account); this.dispatchEventThroughTarget('show-alert', { - detail: { - message: 'Reloading page...', - }, + message: 'Reloading page...', }); const reviewInput: Partial = {}; reviewInput.reviewers = [ @@ -204,9 +202,7 @@ export class GrHovercardAccount extends GestureEventListeners( if (!this.change || !(this.account?._account_id || this.account?.email)) throw new Error('Missing change or account.'); this.dispatchEventThroughTarget('show-alert', { - detail: { - message: 'Reloading page...', - }, + message: 'Reloading page...', }); this.$.restAPI .removeChangeReviewer( @@ -241,10 +237,8 @@ export class GrHovercardAccount extends GestureEventListeners( _handleClickAddToAttentionSet() { if (!this.change || !this.account._account_id) return; this.dispatchEventThroughTarget('show-alert', { - detail: { - message: 'Saving attention set update ...', - dismissOnNavigation: true, - }, + message: 'Saving attention set update ...', + dismissOnNavigation: true, }); // We are deliberately updating the UI before making the API call. It is a @@ -273,10 +267,8 @@ export class GrHovercardAccount extends GestureEventListeners( _handleClickRemoveFromAttentionSet() { if (!this.change || !this.account._account_id) return; this.dispatchEventThroughTarget('show-alert', { - detail: { - message: 'Saving attention set update ...', - dismissOnNavigation: true, - }, + message: 'Saving attention set update ...', + dismissOnNavigation: true, }); // We are deliberately updating the UI before making the API call. It is a