-
Notifications
You must be signed in to change notification settings - Fork 866
Open
Description
Old functionality
In the old pre-rewrite/pre-5.0 way, you could override the data store,
/**
* Sets the emoji-mart data storage.
*
* @private
* @returns {Promise<void>}
* @see https://github.com/missive/emoji-mart#storage
*/
export async function initEmojiMartStorage() {
// get saved values
emojiMartStorage = await AddonSettings.get("emojiMart");
globalThis.emojiMart.setDataStore({
getter: (key) => {
return emojiMartStorage[key];
},
setter: (key, value) => {
emojiMartStorage[key] = value;
// and actually save the new value
// and return promise so async things are noticed
return AddonSettings.set("emojiMart", emojiMartStorage);
}
});
}
taken from here.
See https://github.com/missive/emoji-mart/tree/v2.10.0?tab=readme-ov-file#storage for the old documentation. It said:
By default EmojiMart will store user chosen skin and frequently used emojis in localStorage.
New v5 implementation
Now looking for the same functionality in v5 I am a little lost but searching through the code I can see at least the skin is still read from it:
skin: Store.get('skin') || props.skin, |
And frequently used, too, so hmm. But I am unsure and there is no doc on how to overwrite the storage method. I doubt this is really possible at all, especially in the compiled versions.
Metadata
Metadata
Assignees
Labels
No labels