Skip to content

Commit

Permalink
Merge pull request #142 from serebrov/nickvergessen/more-sensible-def…
Browse files Browse the repository at this point in the history
…ault-populating-of-counters

nickvergessen/more sensible default populating of counters
  • Loading branch information
serebrov authored Nov 21, 2021
2 parents a1a708a + 792535c commit d0aba84
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
30 changes: 15 additions & 15 deletions spec/frequently-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/frequently.js
Original file line number Diff line number Diff line change
Expand Up @@ -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])
}

Expand Down

0 comments on commit d0aba84

Please sign in to comment.