v0.5.3 events and indentation
This commit is contained in:
parent
575c1b0e1e
commit
18c7255b91
103 changed files with 1601 additions and 1906 deletions
|
@ -1,6 +1,6 @@
|
|||
// This file is part of Friendiqa
|
||||
// https://git.friendi.ca/lubuwest/Friendiqa
|
||||
// Copyright (C) 2017 Marco R. <thomasschmidt45@gmx.net>
|
||||
// Copyright (C) 2020 Marco R. <thomasschmidt45@gmx.net>
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
@ -30,7 +30,7 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import QtQuick 2.11
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Controls 2.12
|
||||
import "qrc:/js/news.js" as Newsjs
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/js/service.js" as Service
|
||||
|
@ -162,7 +162,7 @@ StackView{
|
|||
case "Replies":messagetype=3;break;
|
||||
default:messagetype=0;
|
||||
}
|
||||
if(newstab.newstabstatus=="Timeline"){print("lastnewsid "+lastnews_id);
|
||||
if(newstab.newstabstatus=="Timeline"){//print("lastnewsid "+lastnews_id);
|
||||
Newsjs.newsfromdb(root.db,root.login, messagetype,function(news){
|
||||
var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'method':"", 'options':globaloptions};
|
||||
newsWorker.sendMessage(msg);
|
||||
|
@ -187,7 +187,8 @@ StackView{
|
|||
Connections{
|
||||
target:xhr
|
||||
onError:{
|
||||
Helperjs.showMessage(qsTr("Network Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root);
|
||||
if (data !="contactlist"){Helperjs.showMessage(qsTr("Network Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root);}
|
||||
newsBusy.running=false;
|
||||
}
|
||||
onSuccess:{
|
||||
// downloadNotice.text=downloadNotice.text+ "\n xhr finished "+Date.now();
|
||||
|
@ -385,7 +386,6 @@ StackView{
|
|||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
//print(newsSwipeview.stacktype);
|
||||
root.newstypeSignal.connect(newstypeHandling);
|
||||
root.messageSignal.connect(onFriendsMessages);
|
||||
root.contactdetailsSignal.connect(showContact);
|
||||
|
@ -396,7 +396,7 @@ StackView{
|
|||
newsSwipeview.height=rootStackItem.height-12*mm;
|
||||
newsSwipeview.y=5*mm;
|
||||
rootStackItem.state=""
|
||||
login.hasOwnProperty("newsViewType")?newstab.newstabstatus=login.newsViewType:"Conversations"
|
||||
root.globaloptions.hasOwnProperty("newsViewType")?newstab.newstabstatus=root.globaloptions.newsViewType:newstab.newstabstatus="Conversations";
|
||||
var messagetype=0;
|
||||
switch(newsSwipeview.stacktype){
|
||||
case "Home":messagetype=0;break;
|
||||
|
@ -405,17 +405,17 @@ StackView{
|
|||
case "Replies":messagetype=3;break;
|
||||
default:messagetype=0;
|
||||
}
|
||||
if((login.newsViewType=="Conversations")&&(newsSwipeview.stacktype=="Home")){
|
||||
if((newstab.newstabstatus=="Conversations")&&(newsSwipeview.stacktype=="Home")){
|
||||
Newsjs.chatsfromdb(db,login,messagetype,function(dbnews,lastid){
|
||||
lastnewsid=lastid;
|
||||
showNews(dbnews);
|
||||
})
|
||||
}
|
||||
else{Newsjs.newsfromdb(db,login,messagetype,function(dbnews,lastid){
|
||||
else{
|
||||
Newsjs.newsfromdb(db,login,messagetype,function(dbnews,lastid){
|
||||
lastnewsid=lastid;
|
||||
showNews(dbnews)
|
||||
})}
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue