diff --git a/README.md b/README.md index e6b5d681..5a4c3b9f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/serebrov/emoji-mart-vue.svg?branch=master)](https://travis-ci.org/serebrov/emoji-mart-vue) +[![Build Status - CircleCI](https://circleci.com/gh/serebrov/emoji-mart-vue/tree/master.svg?style=svg)](https://circleci.com/gh/serebrov/emoji-mart-vue/tree/master) [![codecov](https://codecov.io/gh/serebrov/emoji-mart-vue/branch/master/graph/badge.svg)](https://codecov.io/gh/serebrov/emoji-mart-vue) diff --git a/spec/frequently-spec.js b/spec/frequently-spec.js index e2ef9857..6f34c853 100644 --- a/spec/frequently-spec.js +++ b/spec/frequently-spec.js @@ -61,21 +61,21 @@ describe('Picker frequnt category', () => { ) expect(window.localStorage['emoji-mart.frequently']).toEqual( JSON.stringify({ - '+1': 16, - grinning: 15, - kissing_heart: 14, - heart_eyes: 13, - laughing: 12, - stuck_out_tongue_winking_eye: 11, - sweat_smile: 10, - joy: 9, - scream: 8, - disappointed: 7, - unamused: 6, - weary: 5, - sob: 4, - sunglasses: 3, - heart: 2, + '+1': 5, + grinning: 4, + kissing_heart: 4, + heart_eyes: 4, + laughing: 4, + stuck_out_tongue_winking_eye: 3, + sweat_smile: 3, + joy: 3, + scream: 3, + disappointed: 2, + unamused: 2, + weary: 2, + sob: 2, + sunglasses: 1, + heart: 1, poop: 1, nerd_face: 25, space_invader: 24, diff --git a/src/utils/frequently.js b/src/utils/frequently.js index b1f61314..342480b3 100644 --- a/src/utils/frequently.js +++ b/src/utils/frequently.js @@ -48,7 +48,7 @@ function get(maxNumber) { let defaultLength = Math.min(maxNumber, DEFAULTS.length) for (let i = 0; i < defaultLength; i++) { - defaults[DEFAULTS[i]] = defaultLength - i + defaults[DEFAULTS[i]] = parseInt((defaultLength - i) / 4, 10) + 1 result.push(DEFAULTS[i]) }