Skip to content

Commit

Permalink
HF 30 - Acc cache
Browse files Browse the repository at this point in the history
  • Loading branch information
1aerostorm committed Sep 6, 2024
1 parent c5d6283 commit 145c472
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/components/elements/messages/Message/Message.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
width: 42px;
margin-top: 14px;
}
.msgs-message .bubble-container .avatar .Userpic {
position: static;
}

.msgs-message .bubble-container a {
color: #007aff;
Expand Down
11 changes: 10 additions & 1 deletion src/redux/FetchDataSaga.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,17 @@ export function* fetchState(location_change_action) {
}

if (accounts.size > 0) {
let accs = yield callSafe(state, [], 'getAccountsAsync', [api, api.getAccountsAsync], Array.from(accounts),
let accs
if (window.accountsCache && window.uac) {
console.log('uac')
accs = window.accountsCache
} else {
console.time('prof: getAcc')
accs = yield callSafe(state, [], 'getAccountsAsync', [api, api.getAccountsAsync], Array.from(accounts),
{ current: account || '' })
console.timeEnd('prof: getAcc')
window.accountsCache = accs
}
if (hasErr) return

for (let i in accs) {
Expand Down

0 comments on commit 145c472

Please sign in to comment.