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:
@@ -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$;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user