v0.5.2
This commit is contained in:
parent
146cefe3d2
commit
e9ce5a59dc
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<manifest package="org.qtproject.friendiqa" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.5.2" android:versionCode="17" android:installLocation="auto">
|
<manifest package="org.qtproject.friendiqa" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.5.2" android:versionCode="19" android:installLocation="auto">
|
||||||
<application android:hardwareAccelerated="true" android:vmSafeMode="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="Friendiqa" android:icon="@drawable/friendiqa" android:logo="@drawable/friendiqa" android:theme="@android:style/Theme.Holo.Light">
|
<application android:hardwareAccelerated="true" android:vmSafeMode="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="Friendiqa" android:icon="@drawable/friendiqa" android:logo="@drawable/friendiqa" android:theme="@android:style/Theme.Holo.Light">
|
||||||
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="androidnative.friendiqa.FriendiqaActivity" android:label="Friendiqa" android:screenOrientation="unspecified" android:launchMode="singleTask" android:taskAffinity="">
|
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="androidnative.friendiqa.FriendiqaActivity" android:label="Friendiqa" android:screenOrientation="unspecified" android:launchMode="singleTask" android:taskAffinity="">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
|
|
@ -187,30 +187,32 @@ else{
|
||||||
if(msg.method=="refresh"){msg.model.clear()};
|
if(msg.method=="refresh"){msg.model.clear()};
|
||||||
msg.model.sync()
|
msg.model.sync()
|
||||||
for (var j=0;j<msg.news.length;j++){
|
for (var j=0;j<msg.news.length;j++){
|
||||||
if (msg.news[j]) {
|
if (msg.news[j]) {
|
||||||
var newsitemobject=msg.news[j];
|
var newsitemobject=msg.news[j];
|
||||||
//print("Newsitem"+JSON.stringify(newsitemobject.friendica_owner+" userid: "+newsitemobject.user.id));
|
// print("Newsitem "+JSON.stringify(newsitemobject.friendica_owner)+" userid: "+newsitemobject.user.id);
|
||||||
// if (newsitemobject.messagetype==2){
|
// if (newsitemobject.messagetype==2){
|
||||||
// newsitemobject.user={};
|
// newsitemobject.user={};
|
||||||
// newsitemobject.user.profile_image="";
|
// newsitemobject.user.profile_image="";
|
||||||
// newsitemobject.user.profile_image_url="";
|
// newsitemobject.user.profile_image_url="";
|
||||||
// newsitemobject.user.name="";
|
// newsitemobject.user.name="";
|
||||||
// }
|
// }
|
||||||
|
|
||||||
//var data=({"newsitemobject": newsitemobject,"dateDiff":timestring,"friendica_activities":friendica_activities,"forumname":forumname})}
|
//var data=({"newsitemobject": newsitemobject,"dateDiff":timestring,"friendica_activities":friendica_activities,"forumname":forumname})}
|
||||||
//print("News:"+j+msg.news.length+JSON.stringify(data));
|
//print("News:"+j+msg.news.length+JSON.stringify(data));
|
||||||
newsitemobject=beautify(newsitemobject,msg);
|
newsitemobject=beautify(newsitemobject,msg);
|
||||||
if (newsitemobject.hasOwnProperty("currentconversation")&&(newsitemobject.currentconversation.length>1)){
|
|
||||||
newsitemobject.lastcomment=beautify(newsitemobject.currentconversation[newsitemobject.currentconversation.length-1],msg);
|
if (newsitemobject.hasOwnProperty("currentconversation")&&(newsitemobject.currentconversation.length>1)){
|
||||||
//print("Currentconversation" + newsitemobject.currentconversation.length+JSON.stringify(newsitemobject.lastcomment))
|
newsitemobject.lastcomment=beautify(newsitemobject.currentconversation[newsitemobject.currentconversation.length-1],msg);
|
||||||
|
//print("Currentconversation" + newsitemobject.currentconversation.length+JSON.stringify(newsitemobject.lastcomment))
|
||||||
|
}
|
||||||
|
var data=({"newsitemobject": newsitemobject})
|
||||||
}
|
}
|
||||||
|
|
||||||
var data=({"newsitemobject": newsitemobject})
|
|
||||||
}
|
|
||||||
if(msg.method=="append") {
|
if(msg.method=="append") {
|
||||||
msg.model.insert(j, data)}
|
msg.model.insert(j, data)}
|
||||||
else{
|
else{
|
||||||
msg.model.append(data)}
|
msg.model.append(data)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (j==msg.news.length){
|
if (j==msg.news.length){
|
||||||
|
|
|
@ -445,7 +445,6 @@ function processNews(api,data){
|
||||||
newslist[n].friendica_author=cleanUser(newslist[n].friendica_author);
|
newslist[n].friendica_author=cleanUser(newslist[n].friendica_author);
|
||||||
newslist[n].user=cleanUser(newslist[n].user);
|
newslist[n].user=cleanUser(newslist[n].user);
|
||||||
if(newslist[n].in_reply_to_user_id){newslist[n].reply_user=Newsjs.objFromArray(allcontacts,"id",newslist[n].in_reply_to_user_id)}
|
if(newslist[n].in_reply_to_user_id){newslist[n].reply_user=Newsjs.objFromArray(allcontacts,"id",newslist[n].in_reply_to_user_id)}
|
||||||
//print (JSON.stringify(newslist[n].user))
|
|
||||||
if(newslist[n].hasOwnProperty('friendica_activities')){
|
if(newslist[n].hasOwnProperty('friendica_activities')){
|
||||||
for (var m in newslist[n].friendica_activities.like){
|
for (var m in newslist[n].friendica_activities.like){
|
||||||
newslist[n].friendica_activities.like[m]=cleanUser(newslist[n].friendica_activities.like[m]);
|
newslist[n].friendica_activities.like[m]=cleanUser(newslist[n].friendica_activities.like[m]);
|
||||||
|
@ -495,7 +494,6 @@ function processNews(api,data){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (api=="/api/conversation/show"|| api=="/api/direct_messages/conversation"){
|
if (api=="/api/conversation/show"|| api=="/api/direct_messages/conversation"){
|
||||||
newslist.reverse();
|
newslist.reverse();
|
||||||
newstab.conversation=newslist
|
newstab.conversation=newslist
|
||||||
|
@ -507,7 +505,8 @@ function processNews(api,data){
|
||||||
showNews(chatlist);root.news=newslist
|
showNews(chatlist);root.news=newslist
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
showNews(newslist);root.news=newslist};
|
showNews(newslist);root.news=newslist
|
||||||
|
};
|
||||||
|
|
||||||
var newstabarray=["Conversations","Favorites","Timeline","DirectMessage","Replies"];
|
var newstabarray=["Conversations","Favorites","Timeline","DirectMessage","Replies"];
|
||||||
if (newstabarray.indexOf(newstab.newstabstatus)>-1){contacttimer.start()}
|
if (newstabarray.indexOf(newstab.newstabstatus)>-1){contacttimer.start()}
|
||||||
|
|
|
@ -157,7 +157,7 @@ Rectangle{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function contactmenu(letter){
|
function contactmenu(letter){//print("letter "+letter)
|
||||||
Newsjs.listFriends(login,db,function(contacts){
|
Newsjs.listFriends(login,db,function(contacts){
|
||||||
contactModel.clear();
|
contactModel.clear();
|
||||||
for (var i=0;i<contacts.length;i++){
|
for (var i=0;i<contacts.length;i++){
|
||||||
|
@ -272,7 +272,7 @@ Rectangle{
|
||||||
var letter=(getText(plaintext.lastIndexOf('@',cursorPosition),cursorPosition)).match(/[a-z]+/);
|
var letter=(getText(plaintext.lastIndexOf('@',cursorPosition),cursorPosition)).match(/[a-z]+/);
|
||||||
contactprefix="@";
|
contactprefix="@";
|
||||||
contactmenu(letter.toString())
|
contactmenu(letter.toString())
|
||||||
} else if( regex2.test(getText(plaintext.lastIndexOf('!',cursorPosition),cursorPosition)+preeditText) && !regex3.test(getText(plaintext.lastIndexOf('@',cursorPosition),cursorPosition)+preeditText) ){
|
} else if( regex2.test(getText(plaintext.lastIndexOf('!',cursorPosition),cursorPosition)+preeditText) && !regex3.test(getText(plaintext.lastIndexOf('!',cursorPosition),cursorPosition)+preeditText) ){
|
||||||
var letter=(getText(plaintext.lastIndexOf('!',cursorPosition),cursorPosition)).match(/[a-z]+/);
|
var letter=(getText(plaintext.lastIndexOf('!',cursorPosition),cursorPosition)).match(/[a-z]+/);
|
||||||
contactprefix="!";
|
contactprefix="!";
|
||||||
contactmenu(letter.toString())
|
contactmenu(letter.toString())
|
||||||
|
|
|
@ -126,7 +126,8 @@ StackView{
|
||||||
var currentTime= new Date();
|
var currentTime= new Date();
|
||||||
// downloadNotice.text=downloadNotice.text + "\n shownews start "+ Date.now();
|
// downloadNotice.text=downloadNotice.text + "\n shownews start "+ Date.now();
|
||||||
//print("appendnews "+JSON.stringify(newsToShow))
|
//print("appendnews "+JSON.stringify(newsToShow))
|
||||||
var msg = {'currentTime': currentTime, 'model': newsModel,'news':newsToShow,'method':newsStack.updateMethodNews, 'options':globaloptions};
|
if (newsToShow.length==1){var method="refresh"}else{var method = newsStack.updateMethodNews}
|
||||||
|
var msg = {'currentTime': currentTime, 'model': newsModel,'news':newsToShow,'method':method, 'options':globaloptions};
|
||||||
newsWorker.sendMessage(msg);
|
newsWorker.sendMessage(msg);
|
||||||
//newsStack.appendNews=false
|
//newsStack.appendNews=false
|
||||||
}
|
}
|
||||||
|
@ -161,14 +162,14 @@ StackView{
|
||||||
case "Replies":messagetype=3;break;
|
case "Replies":messagetype=3;break;
|
||||||
default:messagetype=0;
|
default:messagetype=0;
|
||||||
}
|
}
|
||||||
if(newstab.newstabstatus=="Timeline"){
|
if(newstab.newstabstatus=="Timeline"){print("lastnewsid "+lastnews_id);
|
||||||
Newsjs.newsfromdb(root.db,root.login, messagetype,function(news){
|
Newsjs.newsfromdb(root.db,root.login, messagetype,function(news){
|
||||||
var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'appendnews':true, 'options':globaloptions};
|
var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'method':"", 'options':globaloptions};
|
||||||
newsWorker.sendMessage(msg);
|
newsWorker.sendMessage(msg);
|
||||||
},false,lastnews_id)}
|
},false,lastnews_id)}
|
||||||
if(newstab.newstabstatus=="Conversations"){
|
else if(newstab.newstabstatus=="Conversations"){
|
||||||
Newsjs.chatsfromdb(root.db,root.login, messagetype,function(news){
|
Newsjs.chatsfromdb(root.db,root.login, messagetype,function(news){
|
||||||
var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'appendnews':true, 'options':globaloptions};
|
var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'method':"", 'options':globaloptions};
|
||||||
newsWorker.sendMessage(msg);
|
newsWorker.sendMessage(msg);
|
||||||
},lastnews_id)}
|
},lastnews_id)}
|
||||||
// else if(newstab.newstabstatus=="Contact"){
|
// else if(newstab.newstabstatus=="Contact"){
|
||||||
|
|
Loading…
Reference in a new issue