Method rename: getArticles -> getUpdatedArticles
parent
5cbae70c47
commit
2b6c6d78ea
|
@ -113,7 +113,7 @@ Page {
|
||||||
text: qsTr( "Refresh" )
|
text: qsTr( "Refresh" )
|
||||||
onClicked: {
|
onClicked: {
|
||||||
articlesModel.loaded = false
|
articlesModel.loaded = false
|
||||||
server.getArticles()
|
server.getUpdatedArticles()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,7 +101,7 @@ Item {
|
||||||
return tokenExpiry > Math.floor( (new Date).getTime() / 1000 )
|
return tokenExpiry > Math.floor( (new Date).getTime() / 1000 )
|
||||||
}
|
}
|
||||||
|
|
||||||
function getArticles() {
|
function getUpdatedArticles() {
|
||||||
connect(
|
connect(
|
||||||
function( err ) {
|
function( err ) {
|
||||||
if ( err !== null ) {
|
if ( err !== null ) {
|
||||||
|
@ -110,13 +110,13 @@ Item {
|
||||||
else {
|
else {
|
||||||
console.debug( "Downloading articles changes since last sync" )
|
console.debug( "Downloading articles changes since last sync" )
|
||||||
var props = { url: url, since: lastSync, accessToken: accessToken }
|
var props = { url: url, since: lastSync, accessToken: accessToken }
|
||||||
WallaBase.downloadArticles( props, onGetArticlesDone )
|
WallaBase.downloadArticles( props, onGetUpdatedArticlesDone )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function onGetArticlesDone( articles, err ) {
|
function onGetUpdatedArticlesDone( articles, err ) {
|
||||||
if ( err !== null ) {
|
if ( err !== null ) {
|
||||||
error( qsTr( "Failed to download articles: " ) + err )
|
error( qsTr( "Failed to download articles: " ) + err )
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue