Minor fixes for the "Refresh all feeds" actions

This commit is contained in:
Bart De Vries 2021-04-26 08:05:06 +02:00
parent 7d21f5fbe7
commit aa5dd6bdbf
2 changed files with 11 additions and 9 deletions

View File

@ -28,6 +28,13 @@ Kirigami.ScrollablePage {
}
}
actions.main: Kirigami.Action {
iconName: "view-refresh"
text: i18n("Refresh All Feeds")
onTriggered: refreshing = true
visible: !Kirigami.Settings.isMobile || episodeList.count === 0
}
Kirigami.PlaceholderMessage {
visible: episodeList.count === 0
@ -66,10 +73,4 @@ Kirigami.ScrollablePage {
sourceComponent: episodeListDelegate
}
}
actions.main: Kirigami.Action {
text: i18n("Refresh all feeds")
iconName: "view-refresh"
onTriggered: refreshing = true
visible: !Kirigami.Settings.isMobile
}
}

View File

@ -19,16 +19,17 @@ Kirigami.ScrollablePage {
property var lastEntry: ""
supportsRefreshing: true
onRefreshingChanged:
onRefreshingChanged: {
if(refreshing) {
Fetcher.fetchAll()
refreshing = false
}
}
actions.main: Kirigami.Action {
iconName: "view-refresh"
text: i18n("Refresh Feed")
onTriggered: page.refreshing = true
text: i18n("Refresh All Feeds")
onTriggered: refreshing = true
visible: !Kirigami.Settings.isMobile || queueList.count === 0
}