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 { Kirigami.PlaceholderMessage {
visible: episodeList.count === 0 visible: episodeList.count === 0
@ -66,10 +73,4 @@ Kirigami.ScrollablePage {
sourceComponent: episodeListDelegate 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: "" property var lastEntry: ""
supportsRefreshing: true supportsRefreshing: true
onRefreshingChanged: onRefreshingChanged: {
if(refreshing) { if(refreshing) {
Fetcher.fetchAll() Fetcher.fetchAll()
refreshing = false refreshing = false
} }
}
actions.main: Kirigami.Action { actions.main: Kirigami.Action {
iconName: "view-refresh" iconName: "view-refresh"
text: i18n("Refresh Feed") text: i18n("Refresh All Feeds")
onTriggered: page.refreshing = true onTriggered: refreshing = true
visible: !Kirigami.Settings.isMobile || queueList.count === 0 visible: !Kirigami.Settings.isMobile || queueList.count === 0
} }