Show a not found message when the user searches for nonexistent emoji

This commit is contained in:
Zach Fox 2019-08-20 15:11:17 -07:00
parent 1cb4a31e09
commit 7f45a7b45c

View file

@ -204,6 +204,22 @@ Rectangle {
parent: grid
anchors.rightMargin: -grid.anchors.rightMargin + 2
}
HifiStylesUit.GraphikRegular {
readonly property var cantFindEmojiList: ["😣", "😭", "😖", "😢", "🤔"]
onVisibleChanged: {
if (visible) {
text = "We couldn't find that emoji " + cantFindEmojiList[Math.floor(Math.random() * cantFindEmojiList.length)]
}
}
visible: grid.model.count === 0
anchors.fill: parent
wrapMode: Text.Wrap
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
color: simplifiedUI.colors.text.darkGrey
size: 22
}
}