Browse Source

v0.5.2

tags/v0.5.2
LubuWest 1 month ago
parent
commit
e9ce5a59dc
5 changed files with 31 additions and 29 deletions
  1. +1
    -1
      source-android/android/AndroidManifest.xml
  2. +20
    -18
      source-linux/js/newsworker.js
  3. +2
    -3
      source-linux/js/service.js
  4. +2
    -2
      source-linux/qml/newsqml/MessageSend.qml
  5. +6
    -5
      source-linux/qml/newsqml/NewsStack.qml

+ 1
- 1
source-android/android/AndroidManifest.xml 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>


+ 20
- 18
source-linux/js/newsworker.js View File

@@ -187,30 +187,32 @@ else{
if(msg.method=="refresh"){msg.model.clear()};
msg.model.sync()
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));
// if (newsitemobject.messagetype==2){
// newsitemobject.user={};
// newsitemobject.user.profile_image="";
// newsitemobject.user.profile_image_url="";
// newsitemobject.user.name="";
// }
if (msg.news[j]) {
var newsitemobject=msg.news[j];
// print("Newsitem "+JSON.stringify(newsitemobject.friendica_owner)+" userid: "+newsitemobject.user.id);
// if (newsitemobject.messagetype==2){
// newsitemobject.user={};
// newsitemobject.user.profile_image="";
// newsitemobject.user.profile_image_url="";
// newsitemobject.user.name="";
// }

//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,"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})
}

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){


+ 2
- 3
source-linux/js/service.js 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()}


+ 2
- 2
source-linux/qml/newsqml/MessageSend.qml 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())


+ 6
- 5
source-linux/qml/newsqml/NewsStack.qml 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"){


Loading…
Cancel
Save