Skip to content

Commit

Permalink
fix: enable avatar setters
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriansaliou committed Jul 29, 2024
1 parent 1c5d56f commit 4bf05e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions src/store/tables/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,9 @@ const $account = defineStore("account", {

// Update account avatar
// Notice: this is a cross-store operation, for convenience.
// TODO: implement once SDK has bindings
// if (accountInfo.avatar !== undefined) {
// Store.$avatar.refresh(accountInfo.jid, accountInfo.avatar);
// }
if (accountInfo.avatar !== undefined) {
Store.$avatar.refresh(accountInfo.jid, accountInfo.avatar);
}

// Update stored activity
// Notice: this is a cross-store operation, for convenience.
Expand Down
7 changes: 3 additions & 4 deletions src/store/tables/roster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,9 @@ const $roster = defineStore("roster", {

// Refresh avatar for contact
// Notice: this is a cross-store operation, for convenience.
// TODO: implement once SDK has bindings
// if (contact.avatar !== undefined) {
// Store.$avatar.refresh(contact.jid, contact.avatar);
// }
if (contact.avatar !== undefined) {
Store.$avatar.refresh(contact.jid, contact.avatar);
}
});

this.$patch(state => {
Expand Down

0 comments on commit 4bf05e6

Please sign in to comment.