1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 19:23:52 +00:00

Create New Method for Setting Avatar Color from Sync (#8403)

This commit is contained in:
Justin Baur
2024-03-20 14:28:22 -05:00
committed by GitHub
parent 1400ec9c16
commit ec5c6b6797
3 changed files with 17 additions and 1 deletions

View File

@@ -27,6 +27,10 @@ export class AvatarService implements AvatarServiceAbstraction {
await this.stateProvider.setUserState(AVATAR_COLOR, avatarColor);
}
async setSyncAvatarColor(userId: UserId, color: string): Promise<void> {
await this.stateProvider.getUser(userId, AVATAR_COLOR).update(() => color);
}
getUserAvatarColor$(userId: UserId): Observable<string | null> {
return this.stateProvider.getUser(userId, AVATAR_COLOR).state$;
}