Avatar defaults and colors
This commit is contained in:
parent
a001882d58
commit
12d2b1bf7c
140 changed files with 4212 additions and 1084 deletions
20
ts/util/isSameAvatarData.ts
Normal file
20
ts/util/isSameAvatarData.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { AvatarDataType } from '../types/Avatar';
|
||||
|
||||
export function isSameAvatarData(
|
||||
a?: AvatarDataType,
|
||||
b?: AvatarDataType
|
||||
): boolean {
|
||||
if (!a || !b) {
|
||||
return false;
|
||||
}
|
||||
if (a.buffer && b.buffer) {
|
||||
return a.buffer === b.buffer;
|
||||
}
|
||||
if (a.imagePath && b.imagePath) {
|
||||
return a.imagePath === b.imagePath;
|
||||
}
|
||||
return a.id === b.id;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue