version v0.6.7 with moderation
This commit is contained in:
parent
5f8edccdfe
commit
48a70b8395
46 changed files with 2106 additions and 1026 deletions
|
@ -44,6 +44,7 @@ Item{
|
|||
Layout.fillWidth:true
|
||||
Layout.fillHeight: true
|
||||
property int currentContact: 0
|
||||
signal contactRefreshSignal()
|
||||
|
||||
function showFriends(username){
|
||||
try {friendsModel.clear()} catch(e){};
|
||||
|
@ -86,6 +87,19 @@ Item{
|
|||
},searchText.text,-1);
|
||||
}
|
||||
|
||||
function showBlocked(contact){
|
||||
try {friendsModel.clear()} catch(e){};
|
||||
Newsjs.listBlocked(login,db,function(contactsobject){
|
||||
for (var j=0;j<contactsobject.length;j++){
|
||||
contactsobject[j].description=Qt.atob(contactsobject[j].description);
|
||||
if(Helperjs.getCount(db,login,"contacts","screen_name",contactsobject[j].screen_name)>1){
|
||||
contactsobject[j].screen_name=contactsobject[j].screen_name+"+"+contactsobject[j].cid
|
||||
}
|
||||
friendsModel.append({"contact":contactsobject[j]});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Connections{
|
||||
target:xhr
|
||||
function onDownloaded(type,url,filename,i){
|
||||
|
@ -159,14 +173,18 @@ Item{
|
|||
width: 6*root.fontFactor*osSettings.bigFontSize
|
||||
height: 1.5*root.fontFactor*osSettings.bigFontSize
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
model: [qsTr("Friends"), qsTr("All")]
|
||||
model: [qsTr("Friends"), qsTr("All"), qsTr("Blocked")]
|
||||
onCurrentIndexChanged:{
|
||||
if (currentIndex === 0) {
|
||||
showFriends(root.login.username);
|
||||
} else{
|
||||
} else
|
||||
if (currentIndex===1){
|
||||
showContacts()
|
||||
} else if (currentIndex===2){
|
||||
showBlocked()
|
||||
}
|
||||
}
|
||||
Component.onCompleted: {root.contactRefreshSignal.connect(onCurrentIndexChanged)}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -51,9 +51,6 @@ Item{
|
|||
|
||||
function updateGroup(login,database,group){
|
||||
// update groups
|
||||
//var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
|
||||
//var groupdata={"gid":group.id,"name":group.name,"user":group.user};
|
||||
//print("Groupdata "+JSON.stringify(group));
|
||||
var api="";
|
||||
if (group.new){api="/api/friendica/group_create.json?name="+group.name}else{api="/api/friendica/group_update.json?gid="+group.id}
|
||||
xhr.setUrl(login.server);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue