This commit is contained in:
LubuWest 2019-12-10 21:12:32 +01:00
commit 7119d5bdf4
292 changed files with 790 additions and 16347 deletions

View file

@ -44,15 +44,21 @@ Rectangle {
y:1
color: "white"
// function showContactdetails(contact){
// var component = Qt.createComponent("qrc:/qml/contactqml/ContactDetailsComponent.qml");
// if(contact.isFriend){
// friendsTabView.currentIndex=1;
// var contactDetails = component.createObject(friendstab,{"contact": contact})
// }
// else{friendsTabView.currentIndex=2;
// var contactDetails = component.createObject(friendstab,{"contact": contact})
// }
// }
function showContactdetails(contact){
var component = Qt.createComponent("qrc:/qml/contactqml/ContactDetailsComponent.qml");
if(contact.isFriend){
friendsTabView.currentIndex=1;
var contactDetails = component.createObject(friendstab,{"contact": contact})
}
else{friendsTabView.currentIndex=2;
var contactDetails = component.createObject(friendstab,{"contact": contact})
}
rootstack.currentIndex=0;
bar.currentIndex=0;
root.contactdetailsSignal(contact)
}
function showProfile(callback){
@ -103,6 +109,7 @@ Rectangle {
currentIndex: friendsbar.currentIndex
signal contactsSignal(var contact)
signal groupsSignal(var username)
onCurrentIndexChanged:{
if (currentIndex==1){
contactsSignal("")
@ -147,6 +154,7 @@ Rectangle {
Layout.fillWidth:true
Layout.fillHeight: true
property int currentContact: 0
function showFriends(contact){
try {friendsModel.clear()} catch(e){print(e)};
Helperjs.readData(root.db,"contacts",login.username,function(friendsobject){
@ -209,6 +217,7 @@ Rectangle {
height:friendsGridTab.height-updateFriendsButton.height-2*mm
clip: true
spacing: 2
function processContactSelection(contactobject){showContactdetails(contactobject)}
//add: Transition {
// NumberAnimation { properties: "x,y"; from: 300; duration: 1000 }
// }
@ -269,6 +278,7 @@ Rectangle {
width:contactsGridTab.width-2*mm
height:contactsGridTab.height-cleanButton.height-2*mm
clip: true
function processContactSelection(contactobject){showContactdetails(contactobject)}
//add: Transition {
// NumberAnimation { properties: "x,y"; from: 300; duration: 1000 }
// }
@ -315,7 +325,7 @@ Rectangle {
Connections{
target:xhr
onError:{print(data)}//if (data=="image"){Helperjs.showMessage()}}
onSuccess:{print("gruppe "+data);
onSuccess:{
Newsjs.requestGroups(root.login,root.db,root,function(){
showGroups(root.login.username)});
}