forked from lubuwest/Friendiqa
v0.6.2 Bugfix: download and upload public images, comments in timeline
This commit is contained in:
parent
baccd64303
commit
d09a55bcd9
14 changed files with 200 additions and 145 deletions
|
@ -61,22 +61,28 @@ StackView{
|
|||
if(albums.indexOf(fotorectangle.newimages[i].album)==-1){
|
||||
filesystem.Directory=root.login.imagestore+"/albums";
|
||||
filesystem.makeDir(fotorectangle.newimages[i].album)}
|
||||
ownimagelist.push(root.login.server+"/api/friendica/photo?scale='0'&photo_id="+fotorectangle.newimages[i].id);
|
||||
|
||||
//ownimagelist.push(root.login.server+"/api/friendica/photo?scale='0'&photo_id="+fotorectangle.newimages[i].id);
|
||||
}
|
||||
Imagejs.dataRequest(login,fotorectangle.newimages[0],db,xhr,fotorectangle);
|
||||
})
|
||||
xhr.setLogin(login.username+":"+Qt.atob(login.password));
|
||||
xhr.setImagedir(login.imagestore);
|
||||
xhr.setFilelist(ownimagelist);
|
||||
xhr.setDownloadtype("picturelist");
|
||||
xhr.getlist();
|
||||
// xhr.setLogin(login.username+":"+Qt.atob(login.password));
|
||||
// xhr.setImagedir(login.imagestore);
|
||||
// xhr.setFilelist(ownimagelist);
|
||||
// xhr.setDownloadtype("picturelist");
|
||||
// xhr.getlist();
|
||||
newImagesProgress.visible=true
|
||||
}
|
||||
}
|
||||
|
||||
onCurrentimagenoChanged:{
|
||||
if(fotorectangle.currentimageno==fotorectangle.newimages.length){newImagesProgress.visible=false;showFotos(root.login,"");
|
||||
fotorectangle.newimages=[];fotorectangle.currentimageno=0}
|
||||
// download next image
|
||||
if(fotorectangle.currentimageno==fotorectangle.newimages.length){
|
||||
newImagesProgress.visible=false;showFotos(root.login,"");
|
||||
fotorectangle.newimages=[];fotorectangle.currentimageno=0
|
||||
}else{
|
||||
// download next image
|
||||
Imagejs.dataRequest(login,fotorectangle.newimages[currentimageno],db,xhr,fotorectangle)
|
||||
}
|
||||
}
|
||||
|
||||
Connections{
|
||||
|
@ -90,10 +96,17 @@ StackView{
|
|||
function onDownloaded(type,url,filename,i){
|
||||
if(type=="picture"){fotorectangle.currentimageno=fotorectangle.currentimageno+1}
|
||||
}
|
||||
function onError(data,url,api,code){if(data=="picturelist"){
|
||||
function onError(data,url,api,code){//print("Url "+url+" api " +api + " data "+data)
|
||||
if(data=="picturelist"){
|
||||
var requestid=url.substring(url.lastIndexOf("=")+1);
|
||||
Imagejs.dataRequest(login,requestid,db,xhr,fotorectangle)
|
||||
} else {fotorectangle.currentimageno=fotorectangle.currentimageno+1}
|
||||
Imagejs.dataRequest(login,requestid,db,xhr,fotorectangle);
|
||||
fotorectangle.currentimageno=fotorectangle.currentimageno+1
|
||||
} else if (data=="picture"){
|
||||
Helperjs.deleteData(root.db,"imageData",root.login.username,function(){
|
||||
fotorectangle.currentimageno=fotorectangle.currentimageno+1
|
||||
},"link",url)
|
||||
}else{
|
||||
fotorectangle.currentimageno=fotorectangle.currentimageno+1}
|
||||
}
|
||||
}
|
||||
// Connections{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue