mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-09 10:15:26 +00:00
Use localStorage for emoji pack setting
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import { emojiDictionary } from "../../assets/emojis";
|
||||
|
||||
export type EmojiPack = "mutant" | "twemoji" | "noto" | "openmoji";
|
||||
|
||||
let EMOJI_PACK: EmojiPack = "mutant";
|
||||
const storedPack = localStorage.getItem("emojiPack")
|
||||
let EMOJI_PACK: EmojiPack = storedPack === "mutant" || storedPack === "twemoji" || storedPack === "noto" || storedPack === "openmoji" ? storedPack : "mutant"
|
||||
const REVISION = 3;
|
||||
|
||||
export function setGlobalEmojiPack(pack: EmojiPack) {
|
||||
EMOJI_PACK = pack;
|
||||
localStorage.setItem("emojiPack", pack)
|
||||
}
|
||||
|
||||
// Originally taken from Twemoji source code,
|
||||
|
||||
Reference in New Issue
Block a user