Only show assignee highlight on open changes
The yellow background on changes assigned to the current user is
intended to aid in prioritizing what changes need attention, but changes
that are closed (merged or abandoned) do not need further attention. Do
not show the highlight on these changes.
Also correct an issue where the account was not set in change-lists used
by the change-list-view, resulting in the highlight never appearing in
search results.
Bug: Issue 8476
Change-Id: I93e61f4c98e9a199f94689b611545de484799051
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view.js b/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view.js
index 890713a..f5de254 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view.js
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view.js
@@ -49,9 +49,14 @@
/**
* True when user is logged in.
*/
- loggedIn: {
+ _loggedIn: {
type: Boolean,
- value: false,
+ computed: '_computeLoggedIn(account)',
+ },
+
+ account: {
+ type: Object,
+ value: null,
},
/**
@@ -220,5 +225,9 @@
_computePage(offset, changesPerPage) {
return offset / changesPerPage + 1;
},
+
+ _computeLoggedIn(account) {
+ return !!(account && Object.keys(account).length > 0);
+ },
});
})();