Compute deselected property from selected property in account label
Change-Id: Idbb718538f00a60a0287dc9454929e3514a15455
diff --git a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_html.ts b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_html.ts
index 17e5e26..55f6b8a 100644
--- a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_html.ts
+++ b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_html.ts
@@ -391,7 +391,6 @@
account="[[account]]"
force-attention="[[_computeHasNewAttention(account, _newAttentionSet)]]"
selected="[[_computeHasNewAttention(account, _newAttentionSet)]]"
- deselected="[[!_computeHasNewAttention(account, _newAttentionSet)]]"
hide-hovercard=""
on-click="_handleAttentionClick"
></gr-account-label>
@@ -462,7 +461,6 @@
account="[[_owner]]"
force-attention="[[_computeHasNewAttention(_owner, _newAttentionSet)]]"
selected="[[_computeHasNewAttention(_owner, _newAttentionSet)]]"
- deselected="[[!_computeHasNewAttention(_owner, _newAttentionSet)]]"
hide-hovercard=""
on-click="_handleAttentionClick"
>
@@ -477,7 +475,6 @@
account="[[_uploader]]"
force-attention="[[_computeHasNewAttention(_uploader, _newAttentionSet)]]"
selected="[[_computeHasNewAttention(_uploader, _newAttentionSet)]]"
- deselected="[[!_computeHasNewAttention(_uploader, _newAttentionSet)]]"
hide-hovercard=""
on-click="_handleAttentionClick"
>
@@ -497,7 +494,6 @@
account="[[account]]"
force-attention="[[_computeHasNewAttention(account, _newAttentionSet)]]"
selected="[[_computeHasNewAttention(account, _newAttentionSet)]]"
- deselected="[[!_computeHasNewAttention(account, _newAttentionSet)]]"
hide-hovercard=""
on-click="_handleAttentionClick"
>
@@ -518,7 +514,6 @@
account="[[account]]"
force-attention="[[_computeHasNewAttention(account, _newAttentionSet)]]"
selected="[[_computeHasNewAttention(account, _newAttentionSet)]]"
- deselected="[[!_computeHasNewAttention(account, _newAttentionSet)]]"
hide-hovercard=""
on-click="_handleAttentionClick"
>
diff --git a/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label.ts b/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label.ts
index ab4c5a5..9d21ed8 100644
--- a/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label.ts
+++ b/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label.ts
@@ -96,7 +96,11 @@
@property({type: Object})
_config?: ServerInfo;
- @property({type: Boolean, reflectToAttribute: true})
+ @property({
+ type: Boolean,
+ reflectToAttribute: true,
+ observer: 'selectedChanged',
+ })
selected = false;
@property({type: Boolean, reflectToAttribute: true})
@@ -126,6 +130,10 @@
});
}
+ selectedChanged(selected?: boolean) {
+ this.deselected = !selected;
+ }
+
_isAttentionSetEnabled(
highlight: boolean,
account: AccountInfo,
diff --git a/polygerrit-ui/app/services/checks/checks-model.ts b/polygerrit-ui/app/services/checks/checks-model.ts
index 7d5f053..5d3da42 100644
--- a/polygerrit-ui/app/services/checks/checks-model.ts
+++ b/polygerrit-ui/app/services/checks/checks-model.ts
@@ -299,7 +299,7 @@
internalResultId: 'f0r1',
category: Category.ERROR,
summary: 'Running the mighty test has failed by crashing.',
- message: `Btw, 1 is also not equal to 3. Did you know?`,
+ message: 'Btw, 1 is also not equal to 3. Did you know?',
actions: [
{
name: 'Ignore',