From 65a1f06382e5d371981380ad9809d9aa456c8435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tinkl?= Date: Thu, 1 Sep 2022 12:02:21 +0200 Subject: [PATCH] fix(StatusEmojiPopup): fix initial loading of recent emojis the "Recent emojis" was always empty until the user has clicked additional emoji loading the recent emojis in `Global.onSettingsLoaded` is too late; it's executed long before the popup is opened; instead do it at the end of parsing the categories --- ui/imports/shared/status/StatusEmojiPopup.qml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/ui/imports/shared/status/StatusEmojiPopup.qml b/ui/imports/shared/status/StatusEmojiPopup.qml index 72617bd219..20038ff557 100644 --- a/ui/imports/shared/status/StatusEmojiPopup.qml +++ b/ui/imports/shared/status/StatusEmojiPopup.qml @@ -183,19 +183,10 @@ Popup { } categories = newCategories; - } - Connections { - id: connectionSettings - target: Global - onSettingsLoaded: { - connectionSettings.enabled = false - // Add recent - if (!localAccountSensitiveSettings.recentEmojis || !localAccountSensitiveSettings.recentEmojis.length) { - return - } - categories[0] = localAccountSensitiveSettings.recentEmojis - emojiSectionsRepeater.itemAt(0).allEmojis = localAccountSensitiveSettings.recentEmojis + const recent = localAccountSensitiveSettings.recentEmojis; + if (!!recent) { + emojiSectionsRepeater.itemAt(0).allEmojis = recent; } }