[Feature] Added emoji usage frequency support #618
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is it ?
This PR adds - as an optional feature enabled by default - recent emojis sorted accordingly to their frequency of use. As opposite to the "last used" sorting currently in place.
The goal was to allow a sorting method that would take into account number of uses as well as how recent these uses are.
How it works ?
To explain this briefly, as incoming data we have dates at which emojis had been use, and as outcoming data we want a a value, that we called frequency, that we use to compare emoji against each other.
We compute that "frequency" for each recent emoji by following these steps:
Here is a graphical representation for 0 to 12 times our reference time (which is 24h):
And now ?
The model for now is "as is", and is in test since 1 week, but may need a bit of testing by a larger audience. We can have a less stiff curve to give a bit less importance to "recentness" over number of uses.
Fixes #55