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;
|
categories = newCategories;
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
const recent = localAccountSensitiveSettings.recentEmojis;
|
||||||
id: connectionSettings
|
if (!!recent) {
|
||||||
target: Global
|
emojiSectionsRepeater.itemAt(0).allEmojis = recent;
|
||||||
onSettingsLoaded: {
|
|
||||||
connectionSettings.enabled = false
|
|
||||||
// Add recent
|
|
||||||
if (!localAccountSensitiveSettings.recentEmojis || !localAccountSensitiveSettings.recentEmojis.length) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
categories[0] = localAccountSensitiveSettings.recentEmojis
|
|
||||||
emojiSectionsRepeater.itemAt(0).allEmojis = localAccountSensitiveSettings.recentEmojis
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue