forked from lubuwest/Friendiqa
version v0.6.7 with moderation
This commit is contained in:
parent
5f8edccdfe
commit
48a70b8395
46 changed files with 2106 additions and 1026 deletions
|
@ -132,8 +132,8 @@ Page {
|
|||
BusyIndicator{
|
||||
id: contactBusy
|
||||
anchors.centerIn:parent
|
||||
width:10*mm
|
||||
height: 10*mm
|
||||
width: 1.5*root.fontFactor*osSettings.bigFontSize
|
||||
height: 1.5*root.fontFactor*osSettings.bigFontSize
|
||||
running: true
|
||||
}
|
||||
|
||||
|
@ -159,6 +159,7 @@ Page {
|
|||
function onProfileimagesourceChanged(){profileImage.source=profileimagesource}
|
||||
}
|
||||
}
|
||||
|
||||
Flow{id:buttonflow
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: mm
|
||||
|
@ -222,6 +223,7 @@ Page {
|
|||
})
|
||||
Helperjs.deleteData(root.db,"friendshiprequests",root.login.username,function(){},"id", contact.id)
|
||||
//if (rootstack.currentIndex==1){root.friendsSignal(login.username)}
|
||||
try{root.contactRefreshSignal();}catch(e){print("root.refreshSignal"+e)}
|
||||
rootstackView.pop()
|
||||
}
|
||||
}
|
||||
|
@ -236,6 +238,7 @@ Page {
|
|||
})
|
||||
Helperjs.deleteData(root.db,"friendshiprequests",root.login.username,function(){},"id", contact.id)
|
||||
//if (rootstack.currentIndex==1){root.friendsSignal(login.username)}
|
||||
try{root.contactRefreshSignal();}catch(e){print("root.refreshSignal"+e)}
|
||||
rootstackView.pop()
|
||||
}
|
||||
}
|
||||
|
@ -250,6 +253,7 @@ Page {
|
|||
});
|
||||
Helperjs.deleteData(root.db,"friendshiprequests",root.login.username,function(){},"id", contact.id)
|
||||
//if (rootstack.currentIndex==1){root.friendsSignal(login.username)}
|
||||
try{root.contactRefreshSignal();}catch(e){print("root.refreshSignal"+e)}
|
||||
rootstackView.pop()
|
||||
}
|
||||
}
|
||||
|
@ -264,6 +268,7 @@ Page {
|
|||
|
||||
});
|
||||
Helperjs.updateData(root.db,"contacts",root.login.username,"isFriend",1,function(){},"id",contact.id)
|
||||
try{root.contactRefreshSignal();}catch(e){print("root.refreshSignal"+e)}
|
||||
//if (rootstack.currentIndex==1){root.friendsSignal(login.username)}
|
||||
rootstackView.pop()
|
||||
}
|
||||
|
@ -281,10 +286,40 @@ Page {
|
|||
});
|
||||
Helperjs.updateData(root.db,"contacts",root.login.username,"isFriend",0,function(){},"id",contact.id)
|
||||
//if (rootstack.currentIndex==1){root.friendsSignal(login.username)}
|
||||
try{root.contactRefreshSignal();}catch(e){print("root.refreshSignal"+e)}
|
||||
rootstackView.pop()
|
||||
}
|
||||
}
|
||||
|
||||
MButton{
|
||||
id: blockbutton
|
||||
visible:(contact.statusnet_blocking!=1)
|
||||
height: 6*mm
|
||||
text:qsTr("Block")
|
||||
onClicked:{
|
||||
contactBusy.running=true;
|
||||
Helperjs.updateData(root.db,"contacts",root.login.username,"statusnet_blocking",true,function(){},"id",contact.id)
|
||||
Helperjs.friendicaPostRequest(login,"/api/v1/accounts/" + contact.id + "/block",'',"POST",root,function(returnvalue){
|
||||
});
|
||||
try{root.contactRefreshSignal();}catch(e){print("root.refreshSignal"+e)}
|
||||
rootstackView.pop()
|
||||
}
|
||||
}
|
||||
|
||||
MButton{
|
||||
id: unblockbutton
|
||||
visible:(contact.statusnet_blocking==1)
|
||||
height: 6*mm
|
||||
text:qsTr("Unblock")
|
||||
onClicked:{
|
||||
contactBusy.running=true;
|
||||
Helperjs.updateData(root.db,"contacts",root.login.username,"statusnet_blocking",false,function(){},"id",contact.id)
|
||||
Helperjs.friendicaPostRequest(login,"/api/v1/accounts/" + contact.id + "/unblock",'',"POST",root,function(returnvalue){
|
||||
});
|
||||
try{root.contactRefreshSignal();}catch(e){print("root.refreshSignal"+e)}
|
||||
rootstackView.pop()
|
||||
}
|
||||
}
|
||||
|
||||
}//Flow end
|
||||
Label {
|
||||
|
@ -370,9 +405,6 @@ Page {
|
|||
xhr.clearParams();
|
||||
xhr.setLogin(login.username+":"+Qt.atob(login.password));
|
||||
xhr.setUrl(login.server);
|
||||
// if(contact.isFriend==1 || contact.hasOwnProperty("acct")){
|
||||
// xhr.setApi("/api/statuses/user_timeline");}
|
||||
// else{xhr.setApi("/api/users/show");}
|
||||
xhr.setApi("/api/statuses/user_timeline")
|
||||
xhr.setParam("user_id",contact.id)
|
||||
xhr.get();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue