forked from lubuwest/Friendiqa
v0.6.4 contact search
This commit is contained in:
parent
66e5c33b00
commit
5032c78de1
57 changed files with 2218 additions and 2252 deletions
|
@ -74,7 +74,7 @@ ApplicationWindow{
|
|||
property bool imagePicking: false
|
||||
|
||||
|
||||
Material.theme: Material.System // globaloptions.view_darkmode==1?Material.Dark:Material.Light
|
||||
Material.theme: Material.System
|
||||
color: Material.backgroundColor
|
||||
|
||||
function onLoginChanged(login){
|
||||
|
@ -104,7 +104,7 @@ ApplicationWindow{
|
|||
}
|
||||
}
|
||||
|
||||
function showContact(contact){ //print(JSON.stringify(contact));
|
||||
function showContact(contact){
|
||||
rootstackView.push("qrc:/qml/newsqml/ContactPage.qml",{"contact": contact})
|
||||
}
|
||||
|
||||
|
@ -143,14 +143,14 @@ ApplicationWindow{
|
|||
|
||||
onClosing: {
|
||||
if (rootstack.currentIndex==0){
|
||||
newstab.active=true;print("newstabstatus "+newstab.newstabstatus + " newsViewType " +globaloptions.newsViewType)
|
||||
newstab.active=true;
|
||||
if (newstab.newstabstatus!=globaloptions.newsViewType){
|
||||
newstab.newstabstatus=globaloptions.newsViewType;
|
||||
if(globaloptions.newsViewType=="Timeline"){Newsjs.newsfromdb(db,login.username,0,function(dbnews){
|
||||
newsSignal(dbnews)
|
||||
})}
|
||||
else{
|
||||
Newsjs.chatsfromdb(db,login.username,0,function(dbnews){
|
||||
Newsjs.chatsfromdb(db,login.username,0,[],function(dbnews){
|
||||
newsSignal(dbnews)
|
||||
})}
|
||||
close.accepted=false;
|
||||
|
@ -164,13 +164,14 @@ ApplicationWindow{
|
|||
root.pop();
|
||||
close.accepted=false
|
||||
}
|
||||
else{print("Closing");
|
||||
Service.cleanNews(root.db,function(){print("cleannews");
|
||||
Service.cleanHashtags(root.db,function(){print("cleanhashtags");
|
||||
Service.cleanContacts(root.login,root.db,function(){print("cleancontacts");
|
||||
if (osSettings.osType=="Android"){
|
||||
Qt.quit()}
|
||||
else{print("show systray")
|
||||
else{
|
||||
Service.cleanNews(root.db,function(){
|
||||
Service.cleanHashtags(root.db,function(){
|
||||
Service.cleanContacts(root.login,root.db,function(){
|
||||
if (osSettings.osType=="Android" || !iconTrayAvailable){
|
||||
Qt.quit()
|
||||
}
|
||||
else{
|
||||
systemTray.show();
|
||||
systemTray.showMessage("",qsTr("Background Sync\n Rightclick or Middleclick to Quit"),"",5000)
|
||||
root.hide()
|
||||
|
@ -180,7 +181,7 @@ ApplicationWindow{
|
|||
close.accepted=true
|
||||
}
|
||||
}
|
||||
else if (rootstack.currentIndex==2){fotoSignal(login.username,"backButton");print("close rootstack currentindex==2");close.accepted=false}
|
||||
else if (rootstack.currentIndex==2){fotoSignal(login.username,"backButton");close.accepted=false}
|
||||
else {rootstack.currentIndex=0;close.accepted=false}
|
||||
}
|
||||
|
||||
|
@ -191,24 +192,16 @@ ApplicationWindow{
|
|||
}
|
||||
|
||||
header: ToolBar{
|
||||
position: wideScreen?ToolBar.Header:ToolBar.Footer
|
||||
background: Rectangle{
|
||||
anchors.fill: parent
|
||||
color: Material.backgroundDimColor//"#EEEEEE"//"#F8F8F8"
|
||||
color: Material.backgroundDimColor
|
||||
}
|
||||
RowLayout{
|
||||
anchors.fill: parent
|
||||
ToolButton{
|
||||
visible: !wideScreen
|
||||
text: "\uf0c9"
|
||||
onClicked:{
|
||||
leftDrawer.visible?leftDrawer.close():leftDrawer.open()}
|
||||
}
|
||||
|
||||
TabBar {
|
||||
id: bar
|
||||
Layout.fillWidth: true
|
||||
//width: wideScreen?contentWidth:parent.width-10*mm
|
||||
//x: 7*mm
|
||||
onCurrentIndexChanged: rootstack.currentIndex=bar.currentIndex
|
||||
TabButton {
|
||||
text: "\uf03a"
|
||||
|
@ -216,6 +209,7 @@ ApplicationWindow{
|
|||
anchors.fill: parent
|
||||
color: Material.backgroundDimColor
|
||||
}
|
||||
onDoubleClicked: {newstypeSignal("refresh")}
|
||||
}
|
||||
TabButton {
|
||||
text: "\uf0c0"
|
||||
|
@ -242,10 +236,6 @@ ApplicationWindow{
|
|||
}
|
||||
}
|
||||
|
||||
LeftDrawerAndroid{
|
||||
id: leftDrawer
|
||||
visible:!wideScreen
|
||||
}
|
||||
|
||||
StackView{id:rootstackView
|
||||
width:root.width
|
||||
|
@ -295,7 +285,7 @@ StackView{id:rootstackView
|
|||
Qt.quit()
|
||||
}
|
||||
}
|
||||
Component.onCompleted: {print("systray completed")
|
||||
Component.onCompleted: {
|
||||
icon = iconTray
|
||||
toolTip = qsTr("Click to open Friendiqa")
|
||||
//&hide()
|
||||
|
@ -309,7 +299,6 @@ StackView{id:rootstackView
|
|||
if(globaloptions.view_darkmode==1){Material.theme=Material.Dark}
|
||||
else if (globaloptions.view_darkmode==2){Material.theme=Material.Light}
|
||||
else {Material.theme=Material.System}
|
||||
|
||||
if(!filesystem.Visibility){
|
||||
systemTray.icon = iconTray;
|
||||
// systemTray.toolTip = qsTr("Click to open Friendiqa");
|
||||
|
@ -322,7 +311,7 @@ StackView{id:rootstackView
|
|||
var IntentReceiverQml = component.createObject(root);
|
||||
}
|
||||
else if (osSettings.osType=="Linux"){
|
||||
newstypeSignal("refresh")
|
||||
if (login!=""){newstypeSignal("refresh")}
|
||||
var component = Qt.createComponent("qrc:/qml/genericqml/LinuxSync.qml");
|
||||
var LinuxSyncQml = component.createObject(root);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue