mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-27 13:40:47 +00:00
New composition area with emoji typeahead
This commit is contained in:
committed by
Scott Nonnenberg
parent
e62a1a7812
commit
7b645011c2
17
ts/components/stickers/lib.ts
Normal file
17
ts/components/stickers/lib.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { StickerPackType } from '../../state/ducks/stickers';
|
||||
|
||||
// This function exists to force stickers to be counted consistently wherever
|
||||
// they are counted (TypeScript ensures that all data is named and provided)
|
||||
export function countStickers(o: {
|
||||
knownPacks: ReadonlyArray<StickerPackType>;
|
||||
blessedPacks: ReadonlyArray<StickerPackType>;
|
||||
installedPacks: ReadonlyArray<StickerPackType>;
|
||||
receivedPacks: ReadonlyArray<StickerPackType>;
|
||||
}) {
|
||||
return (
|
||||
o.knownPacks.length +
|
||||
o.blessedPacks.length +
|
||||
o.installedPacks.length +
|
||||
o.receivedPacks.length
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user