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
This commit is contained in:
parent
d30c80ef24
commit
65a1f06382
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue