Commit e45e40a9 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

emojier: remove specific code for the "all" category

parent 2e0a6b07
...@@ -73,7 +73,8 @@ Kirigami.ApplicationWindow ...@@ -73,7 +73,8 @@ Kirigami.ApplicationWindow
var actions = [] var actions = []
for(var i in categories) { for(var i in categories) {
var cat = categories[i] var cat = categories[i]
actions.push(cat === ":recent:" ? recentAction actions.push(cat === ":recent:" ? recentAction :
cat.length === 0 ? categoryActionComponent.createObject(drawer, { category: cat, text: i18n("All"), "icon.name": "view-list-icons" })
: categoryActionComponent.createObject(drawer, { category: cat })) : categoryActionComponent.createObject(drawer, { category: cat }))
} }
return actions; return actions;
...@@ -86,11 +87,9 @@ Kirigami.ApplicationWindow ...@@ -86,11 +87,9 @@ Kirigami.ApplicationWindow
Kirigami.Action { Kirigami.Action {
property string category property string category
checked: window.pageStack.get(0).title === text checked: window.pageStack.get(0).title === text
text: category.length === 0 ? i18n("All") text: category
: category;
icon.name: category.length === 0 ? "view-list-icons" icon.name: "image://text/" + emoji.findFirstEmojiForCategory(category)
: "image://text/" + emoji.findFirstEmojiForCategory(category)
onTriggered: { onTriggered: {
window.pageStack.replace("qrc:/ui/CategoryPage.qml", {title: text, category: category, model: emoji }) window.pageStack.replace("qrc:/ui/CategoryPage.qml", {title: text, category: category, model: emoji })
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment