[ubuntu] Categories.qml: Toggle read/unread feeds in header
This commit is contained in:
parent
052fb649f4
commit
a5bebef931
1 changed files with 16 additions and 0 deletions
|
|
@ -16,6 +16,22 @@ Page {
|
|||
id: categoriesPage
|
||||
title: qsTr("Tiny Tiny RSS Reader")
|
||||
|
||||
head {
|
||||
sections {
|
||||
model: [ qsTr("Unread"), qsTr("All") ]
|
||||
selectedIndex: settings.showAll ? 1 : 0
|
||||
onSelectedIndexChanged: {
|
||||
var ttrss = rootWindow.getTTRSS()
|
||||
var showAll = (categoriesPage.head.sections.selectedIndex == 1)
|
||||
if (showAll != settings.showAll) {
|
||||
ttrss.setShowAll(showAll)
|
||||
settings.showAll = showAll
|
||||
categories.update()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UbuntuListView {
|
||||
id: listView
|
||||
anchors.fill: parent
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue