mirror of
https://github.com/fotoente/MiCECo.git
synced 2024-10-22 15:09:08 +00:00
Bugfix: Emojis in CW String haven't been counted
This commit is contained in:
parent
f46afb8727
commit
7065966964
1 changed files with 4 additions and 1 deletions
|
@ -119,7 +119,10 @@ for element in noteList:
|
||||||
emojiList.append(dict) #TODO: Append a dictionary to acces it way easier
|
emojiList.append(dict) #TODO: Append a dictionary to acces it way easier
|
||||||
|
|
||||||
for emoji in emojiList:
|
for emoji in emojiList:
|
||||||
emoji["count"] += element["text"].count(emoji["emoji"])
|
emoji["count"] += element["text"].count(emoji["emoji"]) #Count those Emojis, that are in this note
|
||||||
|
|
||||||
|
if (element["cw"] is not None):
|
||||||
|
emoji["count"] += element["cw"].count(emoji["emoji"]) #Count those Emojis, that are in this note
|
||||||
|
|
||||||
doubleList = []
|
doubleList = []
|
||||||
emojiList = sorted(emojiList, reverse = True , key = lambda d: d["count"]) #Sort it by the most used Emojis!
|
emojiList = sorted(emojiList, reverse = True , key = lambda d: d["count"]) #Sort it by the most used Emojis!
|
||||||
|
|
Loading…
Reference in a new issue