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
|
||||
|
@ -102,7 +102,7 @@ function getLastNews(login,database,callback){
|
|||
var lastnewsid=0;
|
||||
db.transaction( function(tx) {
|
||||
var result = tx.executeSql('SELECT status_id from news WHERE username="'+login.username+'" AND messagetype=0 ORDER BY status_id DESC LIMIT 1');
|
||||
try{lastnewsid=result.rows.item(0).status_id;}catch(e){print(e)};
|
||||
try{lastnewsid=result.rows.item(0).status_id;}catch(e){lastnewsid=0};
|
||||
callback(lastnewsid)
|
||||
})
|
||||
}
|
||||
|
@ -292,7 +292,7 @@ function newsfromdb(database,login,messagetype,callback,contact,stop_time){
|
|||
newsArray[i].statusnet_html=Qt.atob(newsArray[i].statusnet_html);
|
||||
newsArray[i].text=Qt.atob(newsArray[i].text);
|
||||
newsArray[i].id=newsArray[i].status_id;
|
||||
newsArray[i].friendica_author=newsArray[i].friendica_owner
|
||||
newsArray[i].friendica_author=objFromArray(allcontacts,"url",newsArray[i].friendica_owner)
|
||||
newsArray[i]=fetchUsersForNews(database,login.username,newsArray[i],allcontacts);
|
||||
if (newsArray[i].attachments!="" && newsArray[i].attachments!==null){newsArray[i].attachments=JSON.parse(Qt.atob(newsArray[i].attachments))};
|
||||
}
|
||||
|
@ -487,6 +487,7 @@ function chatsfromdb(database,login,messagetype,callback,stop_time){
|
|||
helpernews.statusnet_html=Qt.atob(helpernews.statusnet_html);
|
||||
helpernews.text=Qt.atob(helpernews.text);
|
||||
helpernews.id=helpernews.status_id;
|
||||
helpernews.friendica_author=objFromArray(allcontacts,"url",helpernews.friendica_owner);
|
||||
if (helpernews.attachments!="" && helpernews.attachments!==null){helpernews.attachments=JSON.parse(Qt.atob(helpernews.attachments))};
|
||||
helpernews.currentconversation=[];
|
||||
for (var h = 0;h<newsrs.rows.length;h++){
|
||||
|
@ -496,6 +497,7 @@ function chatsfromdb(database,login,messagetype,callback,stop_time){
|
|||
helpernews2.statusnet_html=Qt.atob(helpernews2.statusnet_html);
|
||||
helpernews2.text=Qt.atob(helpernews2.text);//print(h+" "+helpernews2.text)
|
||||
helpernews2.id=helpernews2.status_id;
|
||||
helpernews2.friendica_author=objFromArray(allcontacts,"url",helpernews2.friendica_owner);
|
||||
if (helpernews2.attachments!="" && helpernews2.attachments!==null){helpernews2.attachments=JSON.parse(Qt.atob(helpernews2.attachments))};
|
||||
helpernews.currentconversation.push(helpernews2)
|
||||
}
|
||||
|
@ -527,7 +529,7 @@ function allchatsfromdb(database,user,callback){
|
|||
helpernews=fetchUsersForNews(database,user,helpernews,allcontacts);
|
||||
helpernews.statusnet_html=Qt.atob(helpernews.statusnet_html);
|
||||
helpernews.text=Qt.atob(helpernews.text);
|
||||
helpernews.id=helpernews.status_id;
|
||||
helpernews.id=helpernews.status_id;helpernews.friendica_author=objFromArray(allcontacts,"url",helpernews.friendica_owner);
|
||||
if (helpernews.attachments!="" && helpernews.attachments!==null){helpernews.attachments=JSON.parse(Qt.atob(helpernews.attachments))};
|
||||
newsArray.push(helpernews);
|
||||
countArray.push(newsrs.rows.length)
|
||||
|
@ -552,7 +554,7 @@ function oldchatfromdb(database,user,conversationId,lastpost,allcontacts,callbac
|
|||
helpernews=fetchUsersForNews(database,user,helpernews,allcontacts);
|
||||
helpernews.statusnet_html=Qt.atob(helpernews.statusnet_html);
|
||||
helpernews.text=Qt.atob(helpernews.text);
|
||||
helpernews.id=helpernews.status_id;
|
||||
helpernews.id=helpernews.status_id;helpernews.friendica_author=objFromArray(allcontacts,"url",helpernews.friendica_owner);
|
||||
if (helpernews.attachments!="" && helpernews.attachments!==null){helpernews.attachments=JSON.parse(Qt.atob(helpernews.attachments))};
|
||||
callback(helpernews,newscount);}
|
||||
// var conversationobject={news:helpernews,newscount:newscount};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue