diff --git a/common/GPodderCore.qml b/common/GPodderCore.qml index 7682b1f..550e77f 100644 --- a/common/GPodderCore.qml +++ b/common/GPodderCore.qml @@ -27,6 +27,7 @@ Python { property string progname: 'gpodder' property bool ready: false + property bool refreshing: false signal downloading(int episode_id) signal downloadProgress(int episode_id, real progress) signal playbackProgress(int episode_id, real progress) @@ -54,6 +55,7 @@ Python { setHandler('podcast-list-changed', py.podcastListChanged); setHandler('updating-podcast', py.updatingPodcast); setHandler('updated-podcast', py.updatedPodcast); + setHandler('refreshing', function(v) { py.refreshing = v; }); var path = Qt.resolvedUrl('../..').substr('file://'.length); addImportPath(path); diff --git a/touch/StartPage.qml b/touch/StartPage.qml index e7344f8..891172f 100644 --- a/touch/StartPage.qml +++ b/touch/StartPage.qml @@ -110,22 +110,9 @@ SlidePage { StartPageButton { id: freshEpisodesPage - title: 'Fresh episodes' + title: py.refreshing ? 'Refreshing feeds' : 'Fresh episodes' onClicked: pgst.loadPage('FreshEpisodes.qml'); - Component.onCompleted: { - py.setHandler('refreshing', function (is_refreshing) { - refresherButtonArea.visible = !is_refreshing; - if (!is_refreshing) { - freshEpisodesPage.title = 'Fresh episodes'; - } - }); - - py.setHandler('refresh-progress', function (pos, total) { - freshEpisodesPage.title = 'Refreshing feeds (' + pos + '/' + total + ')'; - }); - } - Row { anchors.bottom: parent.bottom anchors.bottomMargin: 50 * pgst.scalef @@ -157,6 +144,7 @@ SlidePage { ButtonArea { id: refresherButtonArea + visible: !py.refreshing anchors { bottom: parent.bottom