Dropped rootWindow.showAll

Used settings.showAll instead.
This commit is contained in:
Michael Käufl 2014-11-09 17:05:53 +01:00
parent 664ee6cabd
commit 5db1ff8815
11 changed files with 11 additions and 15 deletions

View file

@ -54,7 +54,7 @@ Page {
EmptyListInfoLabel {
text: network.loading ?
qsTr("Loading") :
rootWindow.showAll ? qsTr("No categories to display") : qsTr("No categories have unread items")
settings.showAll ? qsTr("No categories to display") : qsTr("No categories have unread items")
anchors.fill: parent
visible: categories.count == 0
}

View file

@ -88,7 +88,7 @@ Page {
EmptyListInfoLabel {
text: network.loading ?
qsTr("Loading") :
rootWindow.showAll ? qsTr("No items in feed") : qsTr("No unread items in feed")
settings.showAll ? qsTr("No items in feed") : qsTr("No unread items in feed")
anchors.fill: parent
anchors.margins: MyTheme.paddingLarge
visible: feedItems.count == 0

View file

@ -65,7 +65,7 @@ Page {
EmptyListInfoLabel {
text: network.loading ?
qsTr("Loading") :
rootWindow.showAll ? qsTr("No feeds in category") : qsTr("Category has no unread items")
settings.showAll ? qsTr("No feeds in category") : qsTr("Category has no unread items")
anchors.fill: parent
visible: feeds.count == 0
}

View file

@ -45,8 +45,6 @@ PageStackWindow {
return TTRss;
}
property bool showAll: false
Binding {
target: theme
property: "inverted"

View file

@ -45,7 +45,7 @@ ListModel {
var ttrss = rootWindow.getTTRSS()
var showAll = ttrss.getShowAll()
rootWindow.showAll = showAll
settings.showAll = showAll
var categories = ttrss.getCategories()

View file

@ -55,7 +55,7 @@ ListModel {
var feeditems = ttrss.getFeedItems(feed.feedId);
var showAll = ttrss.getShowAll();
rootWindow.showAll = showAll;
settings.showAll = showAll;
//root.clear(); clearing is done by caller instead, so this is more like an 'append' and can be used by loadMore aswell
@ -173,7 +173,7 @@ ListModel {
var item = root.get(i)
if (item.unread) {
root.setProperty(i, "unread", false)
if (!rootWindow.showAll) {
if (!settings.showAll) {
root.continuation += 1
}
root.itemUnreadChanged(item)
@ -205,7 +205,7 @@ ListModel {
ttrss.updateFeedUnread(item.id, newState, function(successful,
errorMessage) {
if (successful) {
if (!rootWindow.showAll) {
if (!settings.showAll) {
root.continuation += newState ? +1 : -1
}

View file

@ -49,7 +49,7 @@ ListModel {
function load() {
var ttrss = rootWindow.getTTRSS()
var feeds = ttrss.getFeeds(category.categoryId)
rootWindow.showAll = ttrss.getShowAll()
settings.showAll = ttrss.getShowAll()
root.clear()
if(feeds && feeds.length) {

View file

@ -34,8 +34,6 @@ ApplicationWindow {
return TTRss;
}
property bool showAll: false
Constants {
id: constant
}

View file

@ -70,7 +70,7 @@ Page {
enabled: listView.count == 0
text: network.loading ?
qsTr("Loading") :
(rootWindow.showAll ?
(settings.showAll ?
qsTr("No categories to display") :
qsTr("No categories have unread items"))
}

View file

@ -144,7 +144,7 @@ Page {
enabled: listView.count == 0
text: network.loading ?
qsTr("Loading") :
rootWindow.showAll ? qsTr("No items in feed") : qsTr("No unread items in feed")
settings.showAll ? qsTr("No items in feed") : qsTr("No unread items in feed")
}
BusyIndicator {
visible: listView.count != 0 && network.loading

View file

@ -80,7 +80,7 @@ Page {
enabled: listView.count == 0
text: network.loading ?
qsTr("Loading") :
rootWindow.showAll ? qsTr("No feeds in category") : qsTr("Category has no unread items")
settings.showAll ? qsTr("No feeds in category") : qsTr("Category has no unread items")
}
BusyIndicator {
visible: listView.count != 0 && network.loading