From 956fb94656551adcc1280bcd2a1737b74786b4bd Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 19 Apr 2017 14:30:56 +0100 Subject: [PATCH] Add default frequently used defaults (closes #63) --- src/utils/frequently.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/utils/frequently.js b/src/utils/frequently.js index 73692ef..d4599e5 100644 --- a/src/utils/frequently.js +++ b/src/utils/frequently.js @@ -1,6 +1,20 @@ import store from './store' -let frequently = store.get('frequently') || {} +const increment = 1000000000 +let defaults = { + "heart": 1 * increment, + "smile": 2 * increment, + "disappointed": 3 * increment, + "grinning": 4 * increment, + "slightly_smiling_face": 5 * increment, + "+1": 6 * increment +} + +let frequently = store.get('frequently') +if(!frequently) { + store.set('frequently', defaults) + frequently = defaults +} function add(emoji) { var { id } = emoji