This commit is contained in:
LubuWest 2020-02-02 21:49:07 +01:00
parent 146cefe3d2
commit e9ce5a59dc
5 changed files with 31 additions and 29 deletions

View file

@ -1,5 +1,5 @@
<?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">
<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>

View file

@ -189,7 +189,7 @@ else{
for (var j=0;j<msg.news.length;j++){
if (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){
// newsitemobject.user={};
// newsitemobject.user.profile_image="";
@ -200,17 +200,19 @@ else{
//var data=({"newsitemobject": newsitemobject,"dateDiff":timestring,"friendica_activities":friendica_activities,"forumname":forumname})}
//print("News:"+j+msg.news.length+JSON.stringify(data));
newsitemobject=beautify(newsitemobject,msg);
if (newsitemobject.hasOwnProperty("currentconversation")&&(newsitemobject.currentconversation.length>1)){
newsitemobject.lastcomment=beautify(newsitemobject.currentconversation[newsitemobject.currentconversation.length-1],msg);
//print("Currentconversation" + newsitemobject.currentconversation.length+JSON.stringify(newsitemobject.lastcomment))
}
var data=({"newsitemobject": newsitemobject})
}
if(msg.method=="append") {
msg.model.insert(j, data)}
else{
msg.model.append(data)}
msg.model.append(data)
}
}
if (j==msg.news.length){

View file

@ -445,7 +445,6 @@ function processNews(api,data){
newslist[n].friendica_author=cleanUser(newslist[n].friendica_author);
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)}
//print (JSON.stringify(newslist[n].user))
if(newslist[n].hasOwnProperty('friendica_activities')){
for (var m in newslist[n].friendica_activities.like){
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"){
newslist.reverse();
newstab.conversation=newslist
@ -507,7 +505,8 @@ function processNews(api,data){
showNews(chatlist);root.news=newslist
}
else {
showNews(newslist);root.news=newslist};
showNews(newslist);root.news=newslist
};
var newstabarray=["Conversations","Favorites","Timeline","DirectMessage","Replies"];
if (newstabarray.indexOf(newstab.newstabstatus)>-1){contacttimer.start()}

View file

@ -157,7 +157,7 @@ Rectangle{
}
}
function contactmenu(letter){
function contactmenu(letter){//print("letter "+letter)
Newsjs.listFriends(login,db,function(contacts){
contactModel.clear();
for (var i=0;i<contacts.length;i++){
@ -272,7 +272,7 @@ Rectangle{
var letter=(getText(plaintext.lastIndexOf('@',cursorPosition),cursorPosition)).match(/[a-z]+/);
contactprefix="@";
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]+/);
contactprefix="!";
contactmenu(letter.toString())

View file

@ -126,7 +126,8 @@ StackView{
var currentTime= new Date();
// downloadNotice.text=downloadNotice.text + "\n shownews start "+ Date.now();
//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);
//newsStack.appendNews=false
}
@ -161,14 +162,14 @@ StackView{
case "Replies":messagetype=3;break;
default:messagetype=0;
}
if(newstab.newstabstatus=="Timeline"){
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,'appendnews':true, 'options':globaloptions};
var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'method':"", 'options':globaloptions};
newsWorker.sendMessage(msg);
},false,lastnews_id)}
if(newstab.newstabstatus=="Conversations"){
else if(newstab.newstabstatus=="Conversations"){
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);
},lastnews_id)}
// else if(newstab.newstabstatus=="Contact"){