commit | 9942ad72d7330720c4ba7b54218d098a7cdbecb2 | [log] [tgz] |
---|---|---|
author | Przemyslaw Waliszewski <pwaliszewski@gmail.com> | Tue May 25 22:26:59 2021 +0200 |
committer | Przemyslaw Waliszewski <pwaliszewski@gmail.com> | Wed May 26 13:21:33 2021 +0000 |
tree | 14b4ae9f718ef3a78e5fe26677dd316770ee4783 | |
parent | 8977bc660abccb055ee75145a618507dba1b2cdf [diff] |
Fix empty Registered field on settings screen Registered field is stored in account object. Account object is stored in cache and it is set with first restApi invocation. During the login process, not all account fields are set but cache entry is set. This cache needs to be updated when settings screen is open. Bug: Issue 14600 Change-Id: I4cc1233868c9fafa1035983be14be1b304a348ee
diff --git a/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info.js b/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info.js index 7e312d3..b1b5ba7 100644 --- a/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info.js +++ b/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info.js
@@ -102,6 +102,8 @@ this._serverConfig = config; })); + promises.push(this.$.restAPI.invalidateAccountsDetailCache()); + promises.push(this.$.restAPI.getAccount().then(account => { this._hasNameChange = false; this._hasUsernameChange = false;
diff --git a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-api-interface.js b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-api-interface.js index b675df7..72c8058 100644 --- a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-api-interface.js +++ b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-api-interface.js
@@ -1349,6 +1349,10 @@ this._restApiHelper.invalidateFetchPromisesPrefix('/accounts/'); } + invalidateAccountsDetailCache() { + this._restApiHelper.invalidateFetchPromisesPrefix('/accounts/self/detail'); + } + /** * @param {string} filter * @param {number} groupsPerPage