From 70659669644a2877c48bb7951a0bc11e751bae40 Mon Sep 17 00:00:00 2001 From: Fotoente Date: Sat, 12 Feb 2022 14:16:54 +0100 Subject: [PATCH] Bugfix: Emojis in CW String haven't been counted --- miceco.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/miceco.py b/miceco.py index 34960b4..29b8e6f 100644 --- a/miceco.py +++ b/miceco.py @@ -119,7 +119,10 @@ for element in noteList: emojiList.append(dict) #TODO: Append a dictionary to acces it way easier 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 = [] emojiList = sorted(emojiList, reverse = True , key = lambda d: d["count"]) #Sort it by the most used Emojis!