Friendiqa v0.3

This commit is contained in:
LubuWest 2018-07-01 15:09:21 +02:00
parent 585e329bcb
commit bda2d9f7b5
63 changed files with 2746 additions and 1357 deletions

View File

@ -64,3 +64,13 @@
* Link to list of public server on Config Tab
* Small redesign of SendMessage page
* Intents for texts/urls (Send text or url from everywhere to create message)
## v0.3 ##
* Fix for [issue 6](https://github.com/LubuWest/Friendiqa/issues/6)
* Refactoring of news part
* Search button for news
* Click on hashtag in newsitem starts search for news with that word
* Public timeline
* Timeline for selected group
* Small redesign of SendMessage page

BIN
Friendiqa_v0.3.apk Normal file

Binary file not shown.

View File

@ -18,7 +18,9 @@ QML based client for the Friendica Social Network.
# News #
Currently supported:
* Shows Posts from friends, favorited messages, Direct Messages and Notifications
* Shows Posts from friends, selected group, favorited messages, public timeline, Direct Messages and notifications
* Search button for news
* Click on hashtag in newsitem starts search for news with that word
* Open links in external browser
* Click on contact photo for contact details
* Click on like text for additional contact info

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.2.2" android:versionCode="6" android:installLocation="auto">
<manifest package="org.qtproject.friendiqa" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.3" android:versionCode="7" 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="singleInstance" android:taskAffinity="">
<intent-filter>

View File

@ -21,7 +21,6 @@ public class AndroidNativeActivity extends org.qtproject.qt5.android.bindings.Qt
protected void onResume() {
super.onResume();
if((getIntent().getFlags() == (Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY)) || (getIntent().getFlags() == Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) || (getIntent().getFlags() == Intent.FLAG_ACTIVITY_NEW_TASK) || (getIntent().getFlags() == Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED) || (getIntent().getFlags() == (Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED))) {
SystemDispatcher.onActivityResume();
} else {

View File

@ -135,7 +135,7 @@ public class SystemDispatcher {
message.put("requestCode",requestCode);
message.put("resultCode",resultCode);
message.put("data",data);
Log.d(TAG,"onActivityResult" + isInitialized);
if(isInitialized) {
dispatch(ACTIVITY_RESULT_MESSAGE,message);
waitingIntent=null;

View File

@ -217,7 +217,9 @@
<file>js/image.js</file>
<file>qml/contactqml/ProfileComponent.qml</file>
<file>translations/friendiqa-it.ts</file>
<file>translations/friendiqa-it.qm</file>
<file>qml/genericqml/Search.qml</file>
<file>qml/newsqml/Hashtag.qml</file>
<file>qml/genericqml/IntentReceiver.qml</file>
</qresource>
</RCC>

View File

@ -73,6 +73,10 @@ QString FILESYSTEM::homePath() const
// return dir.exists();
//}
bool FILESYSTEM::fileexist(QString name)
{ return QFile::exists(name);
}
void FILESYSTEM::makeDir(QString name)
{
QDir dir(m_Directory);
@ -113,47 +117,3 @@ QFileInfoList FILESYSTEM::fileList()
//qDebug() << "filelist " << m_Filelist;
return dir.entryInfoList();
}
//void FILESYSTEM::searchImage()
//{
// QAndroidJniObject ACTION_PICK = QAndroidJniObject::getStaticObjectField("android/content/Intent", "ACTION_PICK", "Ljava/lang/String;");
// QAndroidJniObject EXTERNAL_CONTENT_URI = QAndroidJniObject::getStaticObjectField("android/provider/MediaStore$Images$Media", "EXTERNAL_CONTENT_URI", "Landroid/net/Uri;");
// QAndroidJniObject intent=QAndroidJniObject("android/content/Intent", "(Ljava/lang/String;Landroid/net/Uri;)V", ACTION_PICK.object<jstring>(), EXTERNAL_CONTENT_URI.object<jobject>());
// if (ACTION_PICK.isValid() && intent.isValid())
// {
// intent.callObjectMethod("setType", "(Ljava/lang/String;)Landroid/content/Intent;", QAndroidJniObject::fromString("image/*").object<jstring>());
// QtAndroid::startActivity(intent.object<jobject>(), 101,this);
// qDebug() << "OK";
// }
// else
// {
// qDebug() << "ERRO";
// }
//}
//void FILESYSTEM::handleActivityResult(int receiverRequestCode, int resultCode, const QAndroidJniObject &data)
//{
// jint RESULT_OK = QAndroidJniObject::getStaticField<jint>("android/app/Activity", "RESULT_OK");
// if (receiverRequestCode == 101 && resultCode == RESULT_OK)
// {
// QAndroidJniObject uri = data.callObjectMethod("getData", "()Landroid/net/Uri;");
// QAndroidJniObject dadosAndroid = QAndroidJniObject::getStaticObjectField("android/provider/MediaStore$MediaColumns", "DATA", "Ljava/lang/String;");
// QAndroidJniEnvironment env;
// jobjectArray projecao = (jobjectArray)env->NewObjectArray(1, env->FindClass("java/lang/String"), NULL);
// jobject projacaoDadosAndroid = env->NewStringUTF(dadosAndroid.toString().toStdString().c_str());
// env->SetObjectArrayElement(projecao, 0, projacaoDadosAndroid);
// QAndroidJniObject contentResolver = QtAndroid::androidActivity().callObjectMethod("getContentResolver", "()Landroid/content/ContentResolver;");
// QAndroidJniObject cursor = contentResolver.callObjectMethod("query", "(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;", uri.object<jobject>(), projecao, NULL, NULL, NULL);
// jint columnIndex = cursor.callMethod<jint>("getColumnIndex", "(Ljava/lang/String;)I", dadosAndroid.object<jstring>());
// cursor.callMethod<jboolean>("moveToFirst", "()Z");
// QAndroidJniObject resultUri = cursor.callObjectMethod("getString", "(I)Ljava/lang/String;", columnIndex);
// QString imageSelect = "file://" + resultUri.toString();
// emit imageselected(imageSelect);
// }
// else
// {
// qDebug() << "Select error";
// }
//}

View File

@ -65,6 +65,7 @@ signals:
void error(QString data, int code);
public slots:
bool fileexist(QString name);
void makeDir(QString name);
void rmDir();
void rmFile(QString name);

View File

@ -59,6 +59,14 @@ void XHR::setUrl(QString url)
}
}
void XHR::setApi(QString api)
{
if (api!=m_api) {
m_api = api;
emit apiChanged();
}
}
void XHR::setLogin(QString login)
{
if (login!=m_login) {
@ -111,6 +119,11 @@ QString XHR::url() const
return m_url;
}
QString XHR::api() const
{
return m_api;
}
QString XHR::login() const
{
return m_login;
@ -166,6 +179,7 @@ void XHR::download()
request.setRawHeader("Authorization", headerData.toLocal8Bit());
}
request.setUrl(requrl);
//qDebug() << requrl;
reply = manager.get(request);
reply->ignoreSslErrors();
connect(reply, &QNetworkReply::readyRead,this, &XHR::onReadyRead);
@ -185,9 +199,9 @@ void XHR::get()
query.addQueryItem(i.key(), i.value());
}
QUrl requrl(m_url);
QUrl requrl(m_url+m_api);
//qDebug() << requrl;
requrl.setQuery(query);
QByteArray loginData = m_login.toLocal8Bit().toBase64();
QString headerData = "Basic " + loginData;
request.setRawHeader("Authorization", headerData.toLocal8Bit());
@ -250,7 +264,7 @@ void XHR::post()
QString headerData = "Basic " + loginData;
request.setRawHeader(QByteArray("Authorization"), headerData.toLocal8Bit());
request.setUrl(m_url);
request.setUrl(m_url+m_api);
reply = manager.post(request, multiPart);
qDebug() << "\t request sent";
connect(reply, &QNetworkReply::finished, this, &XHR::onReplySuccess);
@ -263,7 +277,7 @@ void XHR::post()
void XHR::onReplyError(QNetworkReply::NetworkError code)
{
qDebug() << code;
emit this->error( bufferToString(), m_url, (int) code);
emit this->error( bufferToString(), m_url,m_api, (int) code);
buffer.clear();
reply->deleteLater();
}
@ -271,7 +285,7 @@ void XHR::onReplyError(QNetworkReply::NetworkError code)
void XHR::onReplySuccess()
{
qDebug() << "!";
emit this->success( bufferToString() );
emit this->success( bufferToString(), m_api);
buffer.clear();
// reply->deleteLater();
}
@ -279,7 +293,7 @@ void XHR::onReplySuccess()
void XHR::onRequestFinished()
{
// Save the file here
if (buffer.isNull()){qDebug() << "File empty"<<m_url; buffer.clear(); emit this->error(m_downloadtype,m_url,1);}
if (buffer.isNull()){qDebug() << "File empty"<<m_url; buffer.clear(); emit this->error(m_downloadtype,m_url,m_api,1);}
else if (m_downloadtype=="picturelist") {
QJsonDocument jsonResponse = QJsonDocument::fromJson(buffer);
QJsonObject jsonObject = jsonResponse.object();

View File

@ -56,6 +56,7 @@ public:
explicit XHR(QObject *parent = 0);
QString url() const;
QString api() const;
QString login() const;
QString filename() const;
QList<QString> contactlist() const;
@ -65,6 +66,7 @@ public:
signals:
void urlChanged();
void apiChanged();
void loginChanged();
void filenameChanged();
void contactlistChanged();
@ -73,11 +75,12 @@ signals:
void downloadtypeChanged();
void downloaded(QString type, QString url, QString filename, int i);
void downloadedjson(QString type, QString url, QString filename, int i,QJsonObject jsonObject);
void success(QString data);
void error(QString data, QString url, int code);
void success(QString data, QString api);
void error(QString data, QString url,QString api, int code);
public slots:
void setUrl(QString url);
void setApi(QString api);
void setLogin(QString login);
void setDownloadtype(QString downloadtype);
void setFilename(QString filename);
@ -103,6 +106,7 @@ private slots:
private:
QByteArray buffer;
QString m_url;
QString m_api;
QString m_login;
QString m_filename;
QString m_downloadtype;

View File

@ -37,7 +37,7 @@ function friendicaRequest(login,api,rootwindow,callback) {
xhrequest.onreadystatechange = function() {
if(xhrequest.readyState === XMLHttpRequest.DONE) {
try{
if (xhrequest.status=200){
if (xhrequest.status==200){
callback(xhrequest.responseText)
}else{
showMessage("Error","API:\n" +login.server+api+"\n NO RESPONSE"+xhrequest.statusText,rootwindow);
@ -65,7 +65,7 @@ function friendicaPostRequest(login,api,data,method,rootwindow,callback) {
callback(xhrequest.responseText)
}
}
catch (e){showMessage("Error", "API:\n" + +api+" "+e+"\n Return:"+xhrequest.responseText,rootwindow)}
catch (e){showMessage("Error", "API:\n" + api+" "+e+"\n Return:"+xhrequest.responseText,rootwindow)}
}
}
xhrequest.open(method, login.server+api,true,login.username,Qt.atob(login.password));
@ -151,7 +151,7 @@ var where = " AND "+ filter +" = '" + filtervalue+"'";
});
}
function showMessage(header,message,rootwindow){//print("message: "+message);
function showMessage(header,message,rootwindow){print("message: "+message);
var cleanmessage=message.replace(/"/g,"-"); //print(cleanmessage);
if(cleanmessage.length>200){cleanmessage=cleanmessage.slice(0,200)+'...'}
var messageString='import QtQuick 2.0; import QtQuick.Dialogs 1.2; MessageDialog{ visible: true; title:"'+header+'";standardButtons: StandardButton.Ok; text:" '+cleanmessage+'"}';

View File

@ -38,7 +38,7 @@ function requestFriends(login,database,rootwindow,callback){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
db.transaction( function(tx) {
var result = tx.executeSql('UPDATE contacts SET isFriend=0 where username="'+login.username+'"')}); // clean old friends
Helperjs.friendicaRequest(login,"/api/statuses/friends?count=9999", rootwindow,function (obj){
Helperjs.friendicaRequest(login,"/api/statuses/friends?count=9999", rootwindow,function (obj){
var friends=JSON.parse(obj);
for (var i=0;i<friends.length;i++){ friends[i].isFriend=1}
//try{requestProfile(login,friends,rootwindow,function(friends_profile){callback(friends_profile)})}
@ -47,8 +47,6 @@ function requestFriends(login,database,rootwindow,callback){
});
}
function requestGroups(login,database,rootwindow,callback){
// retrieve, save and return groups. Other features currently not implemented
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
@ -87,23 +85,34 @@ function deleteGroup(login,database,rootwindow,group, callback){
});
}})}
function getLastNews(login,database){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
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){};
return lastnewsid
})
}
function getFriendsTimeline(login,database,contacts,onlynew,rootwindow,callback){
// retrieve and return timeline since last news, return contacts which are not friends and older than 2 days for update (friends can be updated in Contactstab)
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
var parameter = "?count=50";
if(onlynew){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'); // check for last news id
try{parameter=parameter+"&since_id="+result.rows.item(0).status_id;}catch(e){};})}
var newContacts=[];
Helperjs.friendicaRequest(login,"/api/statuses/friends_timeline"+parameter, rootwindow,function (obj){
var news=JSON.parse(obj);
if (news.hasOwnProperty('status')){
Helperjs.showMessage(qsTr("Error"),"API:\n" +login.server+"/api/statuses/friends_timeline"+parameter+"\n Return: \n"+obj,rootwindow)
}
var newContacts=findNewContacts(news,contacts);
callback(news,newContacts)
})}
//function getFriendsTimeline(login,database,contacts,onlynew,rootwindow,callback){
// // retrieve and return timeline since last news, return contacts which are not friends and older than 2 days for update (friends can be updated in Contactstab)
// var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
// var parameter = "?count=50";
// if(onlynew){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'); // check for last news id
// try{parameter=parameter+"&since_id="+result.rows.item(0).status_id;}catch(e){};})}
// var newContacts=[];
// Helperjs.friendicaRequest(login,"/api/statuses/friends_timeline"+parameter, rootwindow,function (obj){
// var news=JSON.parse(obj);
// if (news.hasOwnProperty('status')){
// Helperjs.showMessage(qsTr("Error"),"API:\n" +login.server+"/api/statuses/friends_timeline"+parameter+"\n Return: \n"+obj,rootwindow)
// }
// var newContacts=findNewContacts(news,contacts);
// callback(news,newContacts)
//})}
function getCurrentContacts(login,database,callback){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
@ -121,7 +130,7 @@ function getCurrentContacts(login,database,callback){
contactlist.push(result2.rows.item(j).url )
}
})
callback(contactlist)
callback(contactlist)
}
function findNewContacts(news,contacts){
@ -132,7 +141,7 @@ function findNewContacts(news,contacts){
news[i].user.isFriend=0;
newContacts.push(news[i].user);
}
if (news[i].friendica_activities.like.length>0){
if (news[i].hasOwnProperty('friendica_activities') && news[i].friendica_activities.like.length>0){
for (var j=0;j<news[i].friendica_activities.like.length;j++){
var like_url=news[i].friendica_activities.like[j].url;
if(contacts.indexOf(like_url)==-1 && !(inArray(newContacts,"url",like_url))){
@ -141,7 +150,7 @@ function findNewContacts(news,contacts){
}
}
}
if (news[i].friendica_activities.dislike.length>0){
if (news[i].hasOwnProperty('friendica_activities') && news[i].friendica_activities.dislike.length>0){
for (var k=0;j<news[k].friendica_activities.dislike.length;k++){
var dislike_url=news[i].friendica_activities.dislike[k].url;
if(contacts.indexOf(dislike_url)==-1 && !(inArray(newContacts,"url",dislike_url))){
@ -151,118 +160,123 @@ function findNewContacts(news,contacts){
}
}
var owner_url=news[i].friendica_owner.url;
if(contacts.indexOf(owner_url)==-1 && !(inArray(newContacts,"url",owner_url))){
news[i].friendica_owner.isFriend=0;
newContacts.push(news[i].friendica_owner);
}
if(news[i].hasOwnProperty('friendica_owner')){
var owner_url=news[i].friendica_owner.url;
if(contacts.indexOf(owner_url)==-1 && !(inArray(newContacts,"url",owner_url))){
news[i].friendica_owner.isFriend=0;
newContacts.push(news[i].friendica_owner);
}
}
}
return newContacts
}
function storeNews(login,database,news,rootwindow,callback){
function storeNews(login,database,news,rootwindow){
// save news after contacts download, call next function
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
for (var i=0;i<news.length;i++){
//print('store news data for ' + news[i].id+JSON.stringify(news[i].friendica_activities));
//var ausdruck=news[i];
var likearray=[]; for (var user in news[i].friendica_activities.like){likearray.push(news[i].friendica_activities.like[user].url)}
var dislikearray=[]; for (var user in news[i].friendica_activities.dislike){dislikearray.push(news[i].friendica_activities.dislike[user].url)}
var attendyesarray=[]; for (var user in news[i].friendica_activities.attendyes){attendyesarray.push(news[i].friendica_activities.attendyes[user].url)}
var attendnoarray=[]; for (var user in news[i].friendica_activities.attendno){attendnoarray.push(news[i].friendica_activities.attendno[user].url)}
var attendmaybearray=[]; for (var user in news[i].friendica_activities.attendmaybe){attendmaybearray.push(news[i].friendica_activities.attendmaybe[user].url)}
var likearray=[];var dislikearray=[];var attendyesarray=[];var attendnoarray=[];var attendmaybearray=[];
if(news[i].hasOwnProperty('friendica_activities')){
for (var user in news[i].friendica_activities.like){likearray.push(news[i].friendica_activities.like[user].url)}
for (var user in news[i].friendica_activities.dislike){dislikearray.push(news[i].friendica_activities.dislike[user].url)}
for (var user in news[i].friendica_activities.attendyes){attendyesarray.push(news[i].friendica_activities.attendyes[user].url)}
for (var user in news[i].friendica_activities.attendno){attendnoarray.push(news[i].friendica_activities.attendno[user].url)}
for (var user in news[i].friendica_activities.attendmaybe){attendmaybearray.push(news[i].friendica_activities.attendmaybe[user].url)}
}
var friendica_activities=[likearray,dislikearray,attendyesarray,attendnoarray,attendmaybearray]
var attachments="";if (news[i].attachments){attachments=Qt.btoa(JSON.stringify(news[i].attachments))}
db.transaction( function(tx) {
var result = tx.executeSql('SELECT * from news where username="'+login.username+'" AND status_id = "'+news[i].id+'" AND messagetype=0'); // check for news id
if(result.rows.length === 1) {// use update
//print(news[i].id +' news exists, update it'+'UPDATE news SET username="'+login.username+'", messagetype=0, text="'+Qt.btoa(news[i].text)+'", created_at="'+Date.parse(cleanDate(news[i].created_at))+'", in_reply_to_status_id="'+news[i].in_reply_to_status_id+'", source="'+news[i].source+'", status_id="'+news[i].id+'", in_reply_to_user_id="'+news[i].in_reply_to_user_id+'", geo="'+news[i].geo+'", favorited="'+news[i].favorited+'", uid="'+news[i].user.id+'", statusnet_html="'+Qt.btoa(news[i].status_html)+'", statusnet_conversation_id="'+news[i].statusnet_conversation_id+'",friendica_activities="'+Qt.btoa(JSON.stringify(friendica_activities))+'",attachments="'+attachments+'",friendica_owner="'+news[i].friendica_owner.url+'" where username="'+login.username+'" AND status_id="'+news[i].status_id+'" AND messagetype=0')
result = tx.executeSql('UPDATE news SET username="'+login.username+'", messagetype=0, text="'+Qt.btoa(news[i].text)+'", created_at="'+Date.parse(cleanDate(news[i].created_at))+'", in_reply_to_status_id="'+news[i].in_reply_to_status_id+'", source="'+news[i].source+'", status_id="'+news[i].id+'", in_reply_to_user_id="'+news[i].in_reply_to_user_id+'", geo="'+news[i].geo+'", favorited="'+news[i].favorited+'", uid="'+news[i].user.id+'", statusnet_html="'+Qt.btoa(news[i].status_html)+'", statusnet_conversation_id="'+news[i].statusnet_conversation_id+'",friendica_activities="'+Qt.btoa(JSON.stringify(friendica_activities))+'",attachments="'+attachments+'",friendica_owner="'+news[i].friendica_owner.url+'" where username="'+login.username+'" AND status_id="'+news[i].status_id+'" AND messagetype=0');
result = tx.executeSql('UPDATE news SET username="'+login.username+'", messagetype=0, text="'+Qt.btoa(news[i].text)+'", created_at="'+news[i].created_at+'", in_reply_to_status_id="'+news[i].in_reply_to_status_id+'", source="'+news[i].source+'", status_id="'+news[i].id+'", in_reply_to_user_id="'+news[i].in_reply_to_user_id+'", geo="'+news[i].geo+'", favorited="'+news[i].favorited+'", uid="'+news[i].user.id+'", statusnet_html="'+Qt.btoa(news[i].status_html)+'", statusnet_conversation_id="'+news[i].statusnet_conversation_id+'",friendica_activities="'+Qt.btoa(JSON.stringify(friendica_activities))+'",attachments="'+attachments+'",friendica_owner="'+news[i].friendica_owner.url+'" where username="'+login.username+'" AND status_id="'+news[i].status_id+'" AND messagetype=0');
} else {// use insert
result = tx.executeSql('INSERT INTO news (username,messagetype,text,created_at,in_reply_to_status_id,source,status_id,in_reply_to_user_id,geo,favorited,uid,statusnet_html,statusnet_conversation_id,friendica_activities,friendica_activities_self,attachments,friendica_owner) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)', [login.username,0,Qt.btoa(news[i].text),Date.parse(cleanDate(news[i].created_at)), news[i].in_reply_to_status_id, news[i].source, news[i].id,news[i].in_reply_to_user_id,news[i].geo,news[i].favorited, news[i].user.id,Qt.btoa(news[i].statusnet_html),news[i].statusnet_conversation_id, Qt.btoa(JSON.stringify(friendica_activities)),"[]",attachments,news[i].friendica_owner.url])}})
result = tx.executeSql('INSERT INTO news (username,messagetype,text,created_at,in_reply_to_status_id,source,status_id,in_reply_to_user_id,geo,favorited,uid,statusnet_html,statusnet_conversation_id,friendica_activities,friendica_activities_self,attachments,friendica_owner) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)', [login.username,0,Qt.btoa(news[i].text),news[i].created_at, news[i].in_reply_to_status_id, news[i].source, news[i].id,news[i].in_reply_to_user_id,news[i].geo,news[i].favorited, news[i].user.id,Qt.btoa(news[i].statusnet_html),news[i].statusnet_conversation_id, Qt.btoa(JSON.stringify(friendica_activities)),"[]",attachments,news[i].friendica_owner.url])}})
}
getDirectMessage(login,database,rootwindow,callback)
// getDirectMessage(login,database,rootwindow,callback)
}
function getDirectMessage(login,database,rootwindow,callback){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
var parameter = "";
db.transaction( function(tx) {
var result = tx.executeSql('SELECT status_id from news WHERE username="'+login.username+'" AND messagetype=1 ORDER BY status_id DESC LIMIT 1'); // check for last news id
try{parameter="&since_id="+result.rows.item(0).status_id;}catch(e){};})
Helperjs.friendicaRequest(login,"/api/direct_messages/all"+parameter,rootwindow, function (obj){
var messages=JSON.parse(obj);
for (var i=0;i<messages.length;i++){
//print('store message data for '+JSON.stringify(messages[i]));
db.transaction( function(tx) {
var result = tx.executeSql('SELECT * from news where username= "'+login.username+'" AND status_id = "'+messages[i].id+'" AND messagetype=1'); // check for news id
if(result.rows.length === 1) {// use update
print(messages[i].id +' directmessage exists, update it')
result = tx.executeSql('UPDATE news SET username="'+login.username+'", messagetype=1, text="'+Qt.btoa(messages[i].text)+'", created_at="'+Date.parse(cleanDate(messages[i].created_at))+'", source="Friendica", status_id="'+messages[i].id+'", uid="'+messages[i].sender.id+'", statusnet_html="'+Qt.btoa(messages[i].text)+'", statusnet_conversation_id="'+messages[i].friendica_parent_uri+'" where username="'+login.username+'" AND status_id="'+messages[i].status_id+'" AND messagetype=1');
} else {// use insert
result = tx.executeSql('INSERT INTO news (username,messagetype,text,created_at,source,status_id,uid,statusnet_html,statusnet_conversation_id) VALUES (?,?,?,?,?,?,?,?,?)', [login.username,1,Qt.btoa(messages[i].text),Date.parse(cleanDate(messages[i].created_at)), "Friendica", messages[i].id, messages[i].sender.id,Qt.btoa(messages[i].text),messages[i].friendica_parent_uri])}
});
}
})
callback()
// if(login.newsViewType=="Timeline"){newsfromdb(database,login.username,callback)}
// else{chatsfromdb(database,login.username,callback)}
}
//function getDirectMessage(login,database,rootwindow,callback){
// var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
// var parameter = "";
// db.transaction( function(tx) {
// var result = tx.executeSql('SELECT status_id from news WHERE username="'+login.username+'" AND messagetype=1 ORDER BY status_id DESC LIMIT 1'); // check for last news id
// try{parameter="&since_id="+result.rows.item(0).status_id;}catch(e){};})
// Helperjs.friendicaRequest(login,"/api/direct_messages/all"+parameter,rootwindow, function (obj){
// var messages=JSON.parse(obj);
// for (var i=0;i<messages.length;i++){
// //print('store message data for '+JSON.stringify(messages[i]));
// db.transaction( function(tx) {
// var result = tx.executeSql('SELECT * from news where username= "'+login.username+'" AND status_id = "'+messages[i].id+'" AND messagetype=1'); // check for news id
// if(result.rows.length === 1) {// use update
// print(messages[i].id +' directmessage exists, update it')
// result = tx.executeSql('UPDATE news SET username="'+login.username+'", messagetype=1, text="'+Qt.btoa(messages[i].text)+'", created_at="'+Date.parse(cleanDate(messages[i].created_at))+'", source="Friendica", status_id="'+messages[i].id+'", uid="'+messages[i].sender.id+'", statusnet_html="'+Qt.btoa(messages[i].text)+'", statusnet_conversation_id="'+messages[i].friendica_parent_uri+'" where username="'+login.username+'" AND status_id="'+messages[i].status_id+'" AND messagetype=1');
// } else {// use insert
// result = tx.executeSql('INSERT INTO news (username,messagetype,text,created_at,source,status_id,uid,statusnet_html,statusnet_conversation_id) VALUES (?,?,?,?,?,?,?,?,?)', [login.username,1,Qt.btoa(messages[i].text),Date.parse(cleanDate(messages[i].created_at)), "Friendica", messages[i].id, messages[i].sender.id,Qt.btoa(messages[i].text),messages[i].friendica_parent_uri])}
// });
// }
// })
// callback()
//// if(login.newsViewType=="Timeline"){newsfromdb(database,login.username,callback)}
//// else{chatsfromdb(database,login.username,callback)}
//}
function getNotifications(login,database,rootwindow,callback){
Helperjs.friendicaRequest(login,"/api/friendica/notifications", rootwindow,function (obj){
var messages=JSON.parse(obj);
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
for (var i=0;i<messages.length;i++){
//print('store message data for '+JSON.stringify(messages[i]));
db.transaction( function(tx) {
var result = tx.executeSql('SELECT * from news where username="'+login.username+'" AND status_id = "'+messages[i].id+'" AND messagetype=2'); // check for news id
if(result.rows.length === 1) {// use update
print(messages[i].id +' Notification exists, update it')
result = tx.executeSql('UPDATE news SET username="'+login.username+'", messagetype=2, text="'+Qt.btoa(messages[i].msg_html)+'", created_at="'+Date.parse(messages[i].date)+'", source="Friendica", status_id="'+messages[i].id+'", uid="'+messages[i].uid+'", statusnet_html="'+Qt.btoa(messages[i].msg_html)+'", statusnet_conversation_id="'+messages[i].parent+'" where username="'+login.username+'" AND status_id="'+messages[i].id+'" AND messagetype=2');
} else {// use insert
result = tx.executeSql('INSERT INTO news (username,messagetype,text,created_at,source,status_id, uid,statusnet_html,statusnet_conversation_id) VALUES (?,?,?,?,?,?,?,?,?)', [login.username,2,Qt.btoa(messages[i].msg_html),Date.parse(messages[i].date),"Friendica", messages[i].id, messages[i].uid,Qt.btoa(messages[i].msg_html),messages[i].parent])}
});
}
db.transaction( function(tx) {
var newsrs=tx.executeSql('select * from news WHERE username="'+login.username+'" AND messagetype=2 ORDER BY status_id DESC LIMIT 20');
var newsArray=[];
for(var j = 0; j < newsrs.rows.length; j++) {
newsArray.push(newsrs.rows.item(j));
callback(newsArray);
}
})
})}
function getActivitiesUserData(database,username,allcontacts,userUrlArray){//print(JSON.stringify(userUrlArray));
//function getNotifications(login,database,rootwindow,callback){
// Helperjs.friendicaRequest(login,"/api/friendica/notifications", rootwindow,function (obj){
// var messages=JSON.parse(obj);
// var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
// for (var i=0;i<messages.length;i++){
// //print('store message data for '+JSON.stringify(messages[i]));
// db.transaction( function(tx) {
// var result = tx.executeSql('SELECT * from news where username="'+login.username+'" AND status_id = "'+messages[i].id+'" AND messagetype=2'); // check for news id
// if(result.rows.length === 1) {// use update
// print(messages[i].id +' Notification exists, update it')
// result = tx.executeSql('UPDATE news SET username="'+login.username+'", messagetype=2, text="'+Qt.btoa(messages[i].msg_html)+'", created_at="'+Date.parse(messages[i].date)+'", source="Friendica", status_id="'+messages[i].id+'", uid="'+messages[i].uid+'", statusnet_html="'+Qt.btoa(messages[i].msg_html)+'", statusnet_conversation_id="'+messages[i].parent+'" where username="'+login.username+'" AND status_id="'+messages[i].id+'" AND messagetype=2');
// } else {// use insert
// result = tx.executeSql('INSERT INTO news (username,messagetype,text,created_at,source,status_id, uid,statusnet_html,statusnet_conversation_id) VALUES (?,?,?,?,?,?,?,?,?)', [login.username,2,Qt.btoa(messages[i].msg_html),Date.parse(messages[i].date),"Friendica", messages[i].id, messages[i].uid,Qt.btoa(messages[i].msg_html),messages[i].parent])}
// });
// }
// db.transaction( function(tx) {
// var newsrs=tx.executeSql('select * from news WHERE username="'+login.username+'" AND messagetype=2 ORDER BY status_id DESC LIMIT 20');
// var newsArray=[];
// for(var j = 0; j < newsrs.rows.length; j++) {
// newsArray.push(newsrs.rows.item(j));
// newsArray[j].statusnet_html=Qt.atob(newsArray[j].statusnet_html);
// callback(newsArray);
// }
// })
//})}
function getActivitiesUserData(allcontacts,userUrlArray){//print(JSON.stringify(userUrlArray));
var helpArray=[];
for (var i=0;i<userUrlArray.length;i++){
helpArray.push(objFromArray(allcontacts,"url",userUrlArray[i]));
// Helperjs.readData(database,"contacts",username,function(userdata){
// helpArray.push(userdata[0]);
// },"url",userUrlArray[i]);
}
return helpArray
}
function newsfromdb(database,username,callback,contact,stop_time){
function newsfromdb(database,user,callback,contact,stop_time){
// return news before stop_time (used by More button), in brackets of 20 entries, or by specified contact
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
db.transaction( function(tx) {
if (!stop_time){var stop="";
try{var rs = tx.executeSql('select created_at from news WHERE username="'+username+'" ORDER BY created_at DESC LIMIT 1');
try{var rs = tx.executeSql('select created_at from news WHERE username="'+user+'" ORDER BY created_at DESC LIMIT 1');
stop="<="+rs.rows.item(0).created_at}catch(e){stop="<99999999999999"}}
else{var stop="<"+stop_time}
var contactfilter="";if(contact){contactfilter=" AND (uid='"+contact+"' OR friendica_owner='"+contact+"')"}
//print('select * from news WHERE username="'+username+'" AND created_at'+stop+contactfilter+' ORDER BY created_at DESC LIMIT 20');
var newsrs=tx.executeSql('select * from news WHERE username="'+username+'" AND created_at'+stop+contactfilter+' ORDER BY created_at DESC LIMIT 20');
var newsrs=tx.executeSql('select * from news WHERE username="'+user+'" AND created_at'+stop+contactfilter+' ORDER BY created_at DESC LIMIT 20');
var newsArray=[];
var allcontacts=[];
Helperjs.readData(database,"contacts",username,function(obj){allcontacts=obj});
var allcontacts=getAllContacts(database,user);
for(var i = 0; i < newsrs.rows.length; i++) {
newsArray.push(newsrs.rows.item(i));
newsArray[i]=fetchUsersForNews(database,username,newsArray[i],allcontacts)
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]=fetchUsersForNews(database,user,newsArray[i],allcontacts);
if (newsArray[i].attachments!==null){newsArray[i].attachments=JSON.parse(Qt.atob(newsArray[i].attachments))};
}
callback(newsArray)});
}
@ -270,33 +284,21 @@ function newsfromdb(database,username,callback,contact,stop_time){
function fetchUsersForNews(database,username,news,allcontacts){//print(JSON.stringify(news))
news.user=objFromArray(allcontacts,"id",news.uid);
if(news.in_reply_to_user_id){news.reply_user=objFromArray(allcontacts,"id",news.in_reply_to_user_id)}
news.friendica_owner_object=objFromArray(allcontacts,"url",news.friendica_owner);
// Helperjs.readData(database,"contacts",username,function(userdata){
// news.user=userdata[0];
// //print("Fetch user"+JSON.stringify(news.user));
// },"id",news.uid);
// if(news.in_reply_to_user_id){
// Helperjs.readData(database,"contacts",username,function(replytodata){
// news.reply_user=replytodata[0];
// //print("Fetch reply to"+JSON.stringify(news.reply_user));
// },"id",news.in_reply_to_user_id);
// }
if (news.messagetype==0){
for(var j=0;j<news.friendica_activities.length;j++)
{var friendicaArray=JSON.parse(Qt.atob(news.friendica_activities));
// print("Array: "+friendicaArray[1]);
news.like=getActivitiesUserData(database,username,allcontacts,friendicaArray[0]);
news.dislike=getActivitiesUserData(database,username,allcontacts,friendicaArray[1]);
news.attendyes=getActivitiesUserData(database,username,allcontacts,friendicaArray[2]);
news.attendno=getActivitiesUserData(database,username,allcontacts,friendicaArray[3]);
news.attendmaybe=getActivitiesUserData(database,username,allcontacts,friendicaArray[4]);
}
// Helperjs.readData(database,"contacts",username,function(friendica_owner_data){
// news.friendica_owner_object=friendica_owner_data[0];
// //print("Fetch friendica_owner"+JSON.stringify(news.friendica_owner));
// },"url",news.friendica_owner);
}
return news
//news.friendica_owner_object=objFromArray(allcontacts,"url",news.friendica_owner);
news.friendica_owner=objFromArray(allcontacts,"url",news.friendica_owner);
if (news.messagetype==0){
var friendicaArray=JSON.parse(Qt.atob(news.friendica_activities));
delete news.friendica_activities;
news.friendica_activities={};
//for(var j=0;j<friendicaArray.length;j++){
news.friendica_activities.like=getActivitiesUserData(allcontacts,friendicaArray[0]);
news.friendica_activities.dislike=getActivitiesUserData(allcontacts,friendicaArray[1]);
news.friendica_activities.attendyes=getActivitiesUserData(allcontacts,friendicaArray[2]);
news.friendica_activities.attendno=getActivitiesUserData(allcontacts,friendicaArray[3]);
news.friendica_activities.attendmaybe=getActivitiesUserData(allcontacts,friendicaArray[4]);
//}
}
return news
}
function deleteNews(login,database,newsid,messagetype,rootwindow,callback){
@ -401,11 +403,14 @@ function conversationfromdb(database,user,conversationId,callback){
db.transaction( function(tx) {
var newsrs=tx.executeSql('select * from news WHERE username="'+user+'" AND statusnet_conversation_id="'+conversationId+'" ORDER BY created_at ASC');
var newsArray=[];
var allcontacts=[];
Helperjs.readData(database,"contacts",user,function(obj){allcontacts=obj});
var allcontacts=getAllContacts(database,user);
for(var i = 0; i < newsrs.rows.length; i++) {
newsArray.push(newsrs.rows.item(i));
newsArray[i]=fetchUsersForNews(database,user,newsArray[i],allcontacts)
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]=fetchUsersForNews(database,user,newsArray[i],allcontacts);
if (newsArray[i].attachments!==null){newsArray[i].attachments=JSON.parse(Qt.atob(newsArray[i].attachments))};
}
callback(newsArray)})
}
@ -419,19 +424,21 @@ function requestFavorites(login,database,contacts,rootwindow,callback){
callback(news,newContacts)
})}
function favoritesfromdb(database,user,callback){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
db.transaction( function(tx) {
//print('select * from news WHERE username="'+user+'" AND favorited=1 ORDER BY status_id DESC');
var newsrs=tx.executeSql('select * from news WHERE username="'+user+'" AND favorited=1 ORDER BY status_id DESC');
var newsArray=[];
var allcontacts=[];
Helperjs.readData(database,"contacts",user,function(obj){allcontacts=obj});
for(var i = 0; i < newsrs.rows.length; i++) {
newsArray.push(newsrs.rows.item(i));
newsArray[i]=fetchUsersForNews(database,user,newsArray[i],allcontacts);
callback(newsArray);
}})}
//function favoritesfromdb(database,user,callback){
// var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
// db.transaction( function(tx) {
// //print('select * from news WHERE username="'+user+'" AND favorited=1 ORDER BY status_id DESC');
// var newsrs=tx.executeSql('select * from news WHERE username="'+user+'" AND favorited=1 ORDER BY status_id DESC');
// var newsArray=[];
// var allcontacts=getAllContacts(database,user);
// for(var i = 0; i < newsrs.rows.length; i++) {
// newsArray.push(newsrs.rows.item(i));
// newsArray[i].statusnet_html=Qt.atob(newsArray[i].statusnet_html);
// newsArray[i].id=newsArray[i].status_id;
// newsArray[i]=fetchUsersForNews(database,user,newsArray[i],allcontacts);
// if (newsArray[i].attachments!==null){newsArray[i].attachments=JSON.parse(Qt.atob(newsArray[i].attachments))};
// callback(newsArray);
// }})}
function chatsfromdb(database,user,callback,stop_time){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
@ -446,25 +453,91 @@ function chatsfromdb(database,user,callback,stop_time){
conversations.push(conversationsrs.rows.item(i).statusnet_conversation_id);
}
var newsArray=[];
var allcontacts=[];
Helperjs.readData(database,"contacts",user,function(obj){allcontacts=obj});
var allcontacts=getAllContacts(database,user);
for(var j = 0; j< conversations.length; j++) {
var newsrs=tx.executeSql('select * from news WHERE username="'+user+'" AND statusnet_conversation_id="'+conversations[j] +'" ORDER BY created_at ASC');
var helpernews=newsrs.rows.item(0);
helpernews.newscount=newsrs.rows.length;
helpernews=fetchUsersForNews(database,user,helpernews,allcontacts);
//var chatArray=[];
// for (var k=0;k<newsrs.rows.length;k++){
// var helperchat=newsrs.rows.item(k);
// helperchat=fetchUsersForNews(database,user,helperchat);
// chatArray.push(helperchat)
//}
//helpernews.chatArray=chatArray;
helpernews.statusnet_html=Qt.atob(helpernews.statusnet_html);
helpernews.text=Qt.atob(helpernews.text);
helpernews.id=helpernews.status_id;
if (helpernews.attachments!==null){helpernews.attachments=JSON.parse(Qt.atob(helpernews.attachments))};
newsArray.push(helpernews);
}
callback(newsArray);
})}
function allchatsfromdb(database,user,callback){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
db.transaction( function(tx) {
// if (!stop_time){var stop="";
// try{var rs = tx.executeSql('select created_at from news WHERE username="'+username+'" ORDER BY created_at DESC LIMIT 1');
// stop="<="+rs.rows.item(0).created_at}catch(e){stop="<99999999999999"}}
// else{var stop="<"+stop_time}
var conversationsrs=tx.executeSql('select DISTINCT statusnet_conversation_id from news WHERE username="'+user+'" ORDER BY created_at DESC'); //+' ORDER BY created_at DESC LIMIT 20');
var conversationIds=[];
for(var i = 0; i < conversationsrs.rows.length; i++) {
conversationIds.push(conversationsrs.rows.item(i).statusnet_conversation_id);
}
var newsArray=[];
var countArray=[];
var allcontacts=getAllContacts(database,user);
for(var j = 0; j< conversationIds.length; j++) {
var newsrs=tx.executeSql('select * from news WHERE username="'+user+'" AND statusnet_conversation_id="'+conversationIds[j] +'" ORDER BY created_at ASC');
var helpernews=newsrs.rows.item(0);
//helpernews.newscount=newsrs.rows.length;
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;
if (helpernews.attachments!==null){helpernews.attachments=JSON.parse(Qt.atob(helpernews.attachments))};
newsArray.push(helpernews);
countArray.push(newsrs.rows.length)
}
var conversationsobject=({});
conversationsobject.conversationIds=conversationIds;
conversationsobject.newsArray=newsArray;
conversationsobject.countArray=countArray;
callback(conversationsobject);
})}
function oldchatfromdb(database,user,conversationId,lastpost,allcontacts,callback){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
db.transaction( function(tx) {
// var newsArray=[];
// var countArray=[];
//var allcontacts=getAllContacts(database,user);
var newsrs=tx.executeSql('select * from news WHERE username="'+user+'" AND statusnet_conversation_id="'+conversationId +'" AND status_id<'+lastpost+' ORDER BY created_at ASC');
if(newsrs.rows.length>0){var helpernews=newsrs.rows.item(0);
var newscount=newsrs.rows.length;
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;
if (helpernews.attachments!==null){helpernews.attachments=JSON.parse(Qt.atob(helpernews.attachments))};
callback(helpernews,newscount);}
// var conversationobject={news:helpernews,newscount:newscount};
// return conversationobject;
})}
function getAllContacts(database,user){
var allcontacts=[];
Helperjs.readData(database,"contacts",user,function(obj){
allcontacts=obj;
for (var n in allcontacts){
allcontacts[n].name=Qt.atob(allcontacts[n].name);
allcontacts[n].description=Qt.atob(allcontacts[n].description)
}
});
return allcontacts;
}
function inArray(list, prop, val) {
if (list.length > 0 ) {
for (var i in list) {if (list[i][prop] == val) {

View File

@ -41,49 +41,50 @@ else{
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 forumname="";try{if (newsitemobject.messagetype==0&&((newsitemobject.friendica_owner)!=(newsitemobject.user.url))){
// if (newsitemobject.messagetype==2){
// newsitemobject.user={};
// newsitemobject.user.profile_image="";
// newsitemobject.user.profile_image_url="";
// newsitemobject.user.name="";
// }
var forumname="";try{if (newsitemobject.messagetype==0&&newsitemobject.hasOwnProperty('friendica_owner')&&((newsitemobject.friendica_owner.url)!=(newsitemobject.user.url))){
//print(newsitemobject.friendica_owner+" Friendica Owner "+JSON.stringify(newsitemobject));
forumname=" via "+Qt.atob(newsitemobject.friendica_owner_object.name)
forumname=" via "+newsitemobject.friendica_owner.name
}}catch(e){print("forum name "+e)}
var likeText="";var dislikeText="";var attendyesText="";var attendnoText="";var attendmaybeText=""; var self={};
try{if (newsitemobject.messagetype==0){
if (newsitemobject.like.length>0){
if (newsitemobject.like.length==1){likeText= Qt.atob(newsitemobject.like[0].name)+" "+ qsTr("likes this.")}
else {likeText= newsitemobject.like.length+" "+ qsTr("like this.")}
try{if (newsitemobject.messagetype==0&&newsitemobject.hasOwnProperty('friendica_activities')){
if (newsitemobject.friendica_activities.like.length>0){
if (newsitemobject.friendica_activities.like.length==1){likeText= newsitemobject.friendica_activities.like[0].name+" "+ qsTr("likes this.")}
else {likeText= newsitemobject.friendica_activities.like.length+" "+ qsTr("like this.")}
}
if (newsitemobject.dislike.length>0){
if (newsitemobject.dislike.length==1){dislikeText= Qt.atob(newsitemobject.dislike[0].name)+" "+ qsTr("doesn't like this.")}
else {dislikeText= newsitemobject.dislike.length+" "+ qsTr("don't like this.")}
if (newsitemobject.friendica_activities.dislike.length>0){
if (newsitemobject.friendica_activities.dislike.length==1){dislikeText= newsitemobject.friendica_activities.dislike[0].name+" "+ qsTr("doesn't like this.")}
else {dislikeText= newsitemobject.friendica_activities.dislike.length+" "+ qsTr("don't like this.")}
}
if (newsitemobject.attendyes.length>0){
if (newsitemobject.attendyes.length==1){attendyesText= Qt.atob(newsitemobject.attendyes[0].name)+" "+ qsTr("will attend.")}
else {attendyesText= newsitemobject.attendyes.length+" "+ qsTr("persons will attend.")}
if (newsitemobject.friendica_activities.attendyes.length>0){
if (newsitemobject.friendica_activities.attendyes.length==1){attendyesText=newsitemobject.friendica_activities.attendyes[0].name+" "+ qsTr("will attend.")}
else {attendyesText= newsitemobject.friendica_activities.attendyes.length+" "+ qsTr("persons will attend.")}
}
if (newsitemobject.attendno.length>0){
if (newsitemobject.attendno.length==1){attendnoText= Qt.atob(newsitemobject.attendno[0].name)+" "+ qsTr("will not attend.")}
else {attendnoText= newsitemobject.attendno.length+" "+ qsTr("persons will not attend.")}
if (newsitemobject.friendica_activities.attendno.length>0){
if (newsitemobject.friendica_activities.attendno.length==1){attendnoText= newsitemobject.friendica_activities.attendno[0].name+" "+ qsTr("will not attend.")}
else {attendnoText= newsitemobject.friendica_activities.attendno.length+" "+ qsTr("persons will not attend.")}
}
if (newsitemobject.attendmaybe.length>0){
if (newsitemobject.attendmaybe.length==1){attendmaybeText= Qt.atob(newsitemobject.attendmaybe[0].name)+" "+ qsTr("may attend.")}
else {attendmaybeText= newsitemobject.attendmaybe.length+" "+ qsTr("persons may attend.")}
if (newsitemobject.friendica_activities.attendmaybe.length>0){
if (newsitemobject.friendica_activities.attendmaybe.length==1){attendmaybeText= newsitemobject.friendica_activities.attendmaybe[0].name+" "+ qsTr("may attend.")}
else {attendmaybeText= newsitemobject.friendica_activities.attendmaybe.length+" "+ qsTr("persons may attend.")}
}
//var friendica_activities_self=JSON.parse(newsitemobject.friendica_activities_self);
if (newsitemobject.hasOwnProperty("friendica_activities_self")){
if (newsitemobject.friendica_activities_self.indexOf(3)!=-1){self.attending=qsTr("yes")}
if (newsitemobject.friendica_activities_self.indexOf(4)!=-1){self.attending=qsTr("no")}
if (newsitemobject.friendica_activities_self.indexOf(5)!=-1){self.attending=qsTr("maybe")}
if (newsitemobject.friendica_activities_self.indexOf(1)!=-1){self.liked=1}
if (newsitemobject.friendica_activities_self.indexOf(2)!=-1){self.disliked=1}
}} catch(e){print("Activities "+e)}
}}} catch(e){print("Activities "+e+ " "+JSON.stringify(newsitemobject.friendica_activities))}
var friendica_activities={likeText:likeText,dislikeText:dislikeText,attendyesText:attendyesText,attendnoText:attendnoText,attendmaybeText:attendmaybeText,self:self}
var attachmentList=[];try{if(newsitemobject.attachments){
var attachArray=JSON.parse(Qt.atob(newsitemobject.attachments));
var attachArray=newsitemobject.attachments;
for (var image in attachArray){if(attachArray[image].mimetype=="image/gif"){
attachmentList.push(attachArray[image])
}

View File

@ -1,5 +1,4 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
// This file is part of Friendiqa // https://github.com/lubuwest/Friendiqa
// Copyright (C) 2017 Marco R. <thomasschmidt45@gmx.net>
//
// This program is free software: you can redistribute it and/or modify
@ -314,7 +313,7 @@ function cleanNews(database,callback){
var maxnewsrs = tx.executeSql("SELECT DISTINCT maxnews FROM config");
var maxnews=maxnewsrs.rows.item(0).maxnews;
var newscountrs = tx.executeSql('SELECT COUNT(*) from news');
var newscount = newscountrs.rows.item(0)["COUNT(*)"];
var newscount = newscountrs.rows.item(0)["COUNT(*)"];//print("newscount "+newscount)
if (newscount>maxnews){
var lastvalidtimers= tx.executeSql('SELECT DISTINCT created_at FROM news ORDER BY created_at ASC LIMIT ' +(newscount-maxnews));
var lastvalidtime=lastvalidtimers.rows.item(newscount-maxnews-1).created_at;
@ -330,6 +329,7 @@ function cleanContacts(login,database,callback){
if (oldestnewsrs.rows.length>0){ var oldestnewsTime=oldestnewsrs.rows.item(0).created_at- 604800000;} else{var oldestnewsTime=0} //contacts can be 7 days old
//print(login.username+" älteste news: "+ oldestnewsTime);
var result = tx.executeSql('SELECT * from contacts WHERE username="'+login.username+'" AND isFriend=0 AND imageAge<'+oldestnewsTime); // check for friends
//print ("Contact result length: "+ result.rows.length)
for (var i=0;i<result.rows.length;i++){
filesystem.rmFile(result.rows.item(i).profile_image);
var deleters = tx.executeSql('DELETE from contacts WHERE username="'+login.username+'" AND url="'+result.rows.item(i).url+'"');
@ -338,50 +338,6 @@ function cleanContacts(login,database,callback){
})
}
function processNews(callback){
if (contactLoadType=="news"){
if(root.news.length==0){}
else{// show news
Newsjs.storeNews(login,db,news,root,function(dbnews){
if(login.newsViewType=="Timeline"){
Newsjs.newsfromdb(db,login.username,function(dbnews){
root.newsSignal(dbnews);
newstab.newstabstatus=login.newsViewType})
}
else{
Newsjs.chatsfromdb(db,login.username,function(dbnews){
root.newsSignal(dbnews);
newstab.newstabstatus=login.newsViewType})
}
})
}
}
else if (contactLoadType=="friends"){// show friends
root.friendsSignal(login.username);
Newsjs.getCurrentContacts(login,db,function(contacts){
contactlist=contacts;
})}
else if (contactLoadType=="conversation"){
var conversationid=news[0].statusnet_conversation_id
if (!isNaN(parseInt(conversationid))){//no directmessage conversation
Newsjs.storeNews(root.login,root.db,news,root,function(){
Newsjs.conversationfromdb(db,root.login.username,conversationid, function(newsarray){
newstab.conversation=newsarray;
})
})}
else {newstab.conversation=news}//only DM conversations from database
}
else if (contactLoadType=="favorites"){//show favorited news
Newsjs.storeNews(root.login,root.db,news,root,function(){
Newsjs.favoritesfromdb(db,login.username,function(newsarray){
root.newsSignal(newsarray);
newstab.newstabstatus="Favorites";
})
})}
callback()
}
function updateContactInDB(login,database,isFriend,contact){// for newstab and friendstab
var currentTime=Date.now();
var image_timestamp=0;
@ -393,8 +349,218 @@ function updateContactInDB(login,database,isFriend,contact){// for newstab and f
var result;
result = tx.executeSql('SELECT * from contacts where username="'+login.username+'" AND url = "'+contact.url+'"'); // check for news url
if(result.rows.length === 1) {// use update
result = tx.executeSql('UPDATE contacts SET id='+contact.id+', name="'+Qt.btoa(contact.name)+'", screen_name="'+contact.screen_name+'", location="'+contact.location+'",imageAge='+currentTime+', profile_image_url="'+contact.profile_image_url+'", description="'+Qt.btoa(contact.description)+'", protected="'+contact.protected+'", followers_count='+contact.followers_count+', friends_count='+contact.friends_count+', created_at="'+ Date.parse(Newsjs.cleanDate(contact.created_at))+'", favourites_count="'+contact.favorites_count+'", utc_offset="'+contact.utc_offset+'", time_zone="'+contact.time_zone+'", statuses_count='+contact.statuses_count+', following="'+contact.following+'", verified ="'+contact.verified+'", statusnet_blocking="'+contact.statusnet_blocking+'", notifications="'+contact.notifictions+'", statusnet_profile_url="'+contact.statusnet_profile_url+'", cid='+contact.cid+', network="'+contact.network+'", isFriend='+isFriend+', timestamp='+ currentTime+' where username="'+login.username+'" AND url="'+contact.url+'"');
result = tx.executeSql('UPDATE contacts SET id='+contact.id+', name="'+Qt.btoa(contact.name)+'", screen_name="'+contact.screen_name+'", location="'+contact.location+'",imageAge='+currentTime+', profile_image_url="'+contact.profile_image_url+'", description="'+Qt.btoa(contact.description)+'", protected="'+contact.protected+'", followers_count='+contact.followers_count+', friends_count='+contact.friends_count+', created_at="'+ contact.created_at+'", favourites_count="'+contact.favorites_count+'", utc_offset="'+contact.utc_offset+'", time_zone="'+contact.time_zone+'", statuses_count='+contact.statuses_count+', following="'+contact.following+'", verified ="'+contact.verified+'", statusnet_blocking="'+contact.statusnet_blocking+'", notifications="'+contact.notifictions+'", statusnet_profile_url="'+contact.statusnet_profile_url+'", cid='+contact.cid+', network="'+contact.network+'", isFriend='+isFriend+', timestamp='+ currentTime+' where username="'+login.username+'" AND url="'+contact.url+'"');
} else {// use insert
result = tx.executeSql('INSERT INTO contacts VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)', [login.username,contact.id,Qt.btoa(contact.name),contact.screen_name,contact.location,currentTime,contact.profile_image_url, Qt.btoa(contact.description),"",contact.url,contact.protected,contact.followers_count, contact.friends_count,Date.parse(Newsjs.cleanDate(contact.created_at)),contact.favorites_count,contact.utc_offset,contact.time_zone,contact.statuses_count,contact.following,contact.verfied,contact.statusnet_blocking,contact.notifications,contact.statusnet_profile_url,contact.cid,contact.network,isFriend,image_timestamp]);}
result = tx.executeSql('INSERT INTO contacts VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)', [login.username,contact.id,Qt.btoa(contact.name),contact.screen_name,contact.location,currentTime,contact.profile_image_url, Qt.btoa(contact.description),"",contact.url,contact.protected,contact.followers_count, contact.friends_count,contact.created_at,contact.favorites_count,contact.utc_offset,contact.time_zone,contact.statuses_count,contact.following,contact.verfied,contact.statusnet_blocking,contact.notifications,contact.statusnet_profile_url,contact.cid,contact.network,isFriend,image_timestamp]);}
});
}
function processNews(api,data){
try{var newslist=JSON.parse(data);
} catch(e){
Helperjs.showMessage(qsTr("Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root)};
if (typeof(newslist)=='undefined'){
Helperjs.showMessage(qsTr("Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root)
}
else if (newslist.hasOwnProperty('status')){
Helperjs.showMessage(qsTr("Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root)
} else if (!(Array.isArray(newslist))){
replytimer.restart()
} else {
var allcontacts=[];
allcontacts=Newsjs.getAllContacts(db,login.username);
if (api=="/api/direct_messages/all"){
for (var n in newslist){
newslist[n].created_at=Date.parse(Newsjs.cleanDate(newslist[n].created_at));
newslist[n].messagetype=1;
newslist[n].source=" Friendica";
newslist[n].status_id=newslist[n].id;
newslist[n].uid=newslist[n].sender.id;
newslist[n].statusnet_conversation_id=newslist[n].friendica_parent_uri;
newslist[n].user=cleanUser(newslist[n].sender);
newslist[n].statusnet_html=newslist[n].text;
}}
else if (api=="/api/friendica/notifications"){
for (var n in newslist){
newslist[n].created_at=Date.parse(newslist[n].date);
newslist[n].messagetype=2;
newslist[n].user=Newsjs.objFromArray(allcontacts,"url",newslist[n].url)
if (newslist[n].user==false){
newslist[n].user={"profile_image_url": newslist[n].photo,"name": newslist[n].name," url":newslist[n].url, "created_at":newslist[n].date};
newslist[n].user=cleanUser(newslist[n].user);
}
newslist[n].statusnet_html=newslist[n].msg_html;
}
} else {
var chatlist=[];
var conversationIds=[];
var commentCount=[];
for (var n in newslist){
newslist[n].created_at=Date.parse(Newsjs.cleanDate(newslist[n].created_at));
newslist[n].messagetype=0;
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]);
}
for (var o in newslist[n].friendica_activities.dislike){
newslist[n].friendica_activities.dislike[o]=cleanUser(newslist[n].friendica_activities.dislike[o]);
}
for (var p in newslist[n].friendica_activities.attendyes){
newslist[n].friendica_activities.attendyes[p]=cleanUser(newslist[n].friendica_activities.attendyes[p]);
}
for (var q in newslist[n].friendica_activities.attendno){
newslist[n].friendica_activities.attendno[q]=cleanUser(newslist[n].friendica_activities.attendno[q]);
}
for (var r in newslist[n].friendica_activities.attendmaybe){
newslist[n].friendica_activities.attendmaybe[r]=cleanUser(newslist[n].friendica_activities.attendmaybe[r]);
}
}
if(!(newslist[n].hasOwnProperty('friendica_owner'))){
newslist[n].friendica_owner=newslist[n].user
}
var conversationindex=conversationIds.indexOf(newslist[n].statusnet_conversation_id);
//fill chatlist
if (conversationindex==-1){
chatlist.push(newslist[n]);
conversationIds.push(newslist[n].statusnet_conversation_id);
commentCount.push(1);
} else{
commentCount[conversationindex]=commentCount[conversationindex]+1;
chatlist[conversationindex]=newslist[n];
}
}
//enrich chatlist with old entries
for (var count in chatlist){ //print("chat "+JSON.stringify(chatlist[count])+" count: "+commentCount[count])
//chatlist[count].newscount=commentCount[count]
if (chatlist[count].id_str!==chatlist[count].statusnet_conversation_id){
try{
Newsjs.oldchatfromdb(db,login.username,chatlist[count].statusnet_conversation_id,chatlist[count].id,allcontacts,function(oldpost,oldcount){
chatlist[count]=oldpost;
chatlist[count].newscount=oldcount+commentCount[count];
//print("JSON "+chatlist[count].statusnet_conversation_id+" "+chatlist[count].id+JSON.stringify(oldpost))
})
}catch(e){print(e)}
}
else{chatlist[count].newscount=commentCount[count]}
}
}
if (api=="/api/conversation/show"){
newslist.reverse();
newstab.conversation=newslist
}
else if (newstab.newstabstatus==="Conversations"){
showNews(chatlist);root.news=newslist}
else {showNews(newslist);root.news=newslist};
var newstabarray=["Conversations","Favorites","Timeline","DirectMessage"];
if (newstabarray.indexOf(newstab.newstabstatus)>-1){contacttimer.start()}
}
}
function cleanUser(user){
user.created_at=Date.parse(Newsjs.cleanDate(user.created_at));
var imagehelper1=user.profile_image_url.split("?");
var imagehelper2=imagehelper1[0].substring(imagehelper1[0].lastIndexOf("/")+1,imagehelper1[0].length);
var imagehelper3=login.imagestore+"contacts/"+user.screen_name+"-"+imagehelper2
if(filesystem.fileexist(imagehelper3)){user.profile_image=imagehelper3}else {user.profile_image=""}
return user
}
function updateView(viewtype){
newsBusy.running=true;
//downloadNotice.text="xhr start "+Date.now()
switch(viewtype){
case "Conversations":
var lastnews=Newsjs.getLastNews(login,db);
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/statuses/friends_timeline");
xhr.clearParams();
xhr.setParam("since_id",lastnews);
xhr.setParam("count",50)
break;
case "Timeline":
var lastnews=Newsjs.getLastNews(login,db);
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/statuses/friends_timeline");
xhr.clearParams();
xhr.setParam("since_id",lastnews);
xhr.setParam("count",50)
break;
case "Search":
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/search");
break;
case "Notifications":
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/friendica/notifications");
xhr.clearParams();
break;
case "Direct Messages":
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/direct_messages/all");
xhr.clearParams();
break;
case "Public Timeline":
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/statuses/public_timeline");
xhr.clearParams();
break;
case "Favorites":
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/favorites");
xhr.clearParams();
break;
default:
var lastnews=Newsjs.getLastNews(login,db);
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/statuses/friends_timeline");
xhr.clearParams();
xhr.setParam("since_id",lastnews);
xhr.setParam("count",50)
newstab.newstabstatus="Conversations";
}
xhr.get();
if (viewtype==="Conversations"){Newsjs.allchatsfromdb(db,login.username,function(temp){
newsStack.allchats=temp
})}
}
function showGroups(){
Helperjs.readData(db,"groups",login.username,function(groups){
var groupitems="";
for (var i=0;i<groups.length;i++){
groupitems=groupitems+"MenuItem{text:'"+groups[i].groupname+"'; onTriggered: Service.getGroupnews("+groups[i].gid+")}"
}
var menuString="import QtQuick.Controls 1.4; import 'qrc:/js/service.js' as Service; Menu {"+groupitems+"}";
var grouplistObject=Qt.createQmlObject(menuString,newsStack,"groupmenuOutput");
grouplistObject.popup()
})
}
function getGroupnews(list){
newstab.newstabstatus="Group news";
newsBusy.running=true;
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/lists/statuses");
xhr.clearParams();
xhr.setParam("list_id",list)
xhr.get();
}

View File

@ -43,7 +43,7 @@ Rectangle{
textFormat: Text.RichText
width: parent.width
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
text: "<b>Friendiqa v0.2 </b><br>Licensed under GPL 3 with the exception of OpenSSL <br> "+
text: "<b>Friendiqa v0.3 </b><br>Licensed under GPL 3 with the exception of OpenSSL <br> "+
"Profile <a href='https://freunde.ma-nic.de/profile/friendiqa'>https://freunde.ma-nic.de/profile/friendiqa</a><br>"+
"Sourcecode: <a href='https://github.com/LubuWest/Friendiqa'>https://github.com/LubuWest/Friendiqa</a><br>"+
"C++ code by <a href='https://kirgroup.com/profile/fabrixxm'>Fabio</a><br>"+

View File

@ -37,7 +37,7 @@ Item {
id: contactLargeComponent
x:mm
y:mm
property var contact:{}
property var contact:({})
property var createdAtDate: new Date(contact.created_at)
property string connectUrl: (contact.network!=="dfrn")||(contact.isFriend!=0)?"":( "<a href='"+contact.url.replace("profile","dfrn_request") +"'>"+qsTr("Connect")+"</a><br>")
@ -63,7 +63,7 @@ Rectangle {
x: mm
width: root.width-6*mm //friendsTabView.width-4*mm
height: 3*mm
text:Qt.atob(contact.name)+" (@"+contact.screen_name+")"
text:contact.name+" (@"+contact.screen_name+")"
elide:Text.ElideRight
anchors.topMargin: 0
anchors.left: photoImage.left
@ -91,7 +91,7 @@ Rectangle{
font.pixelSize: 3*mm
textFormat:Text.RichText
wrapMode: Text.Wrap
text:"<b>"+qsTr("Description")+": </b> "+Qt.atob(contact.description)+"<br> <b>"+qsTr("Location")+":</b> "+contact.location+"<br> <b>"+qsTr("Posts")+":</b> "+contact.statuses_count+
text:"<b>"+qsTr("Description")+": </b> "+contact.description+"<br> <b>"+qsTr("Location")+":</b> "+contact.location+"<br> <b>"+qsTr("Posts")+":</b> "+contact.statuses_count+
"<br> <b>"+qsTr("URL")+":</b> <a href='"+ contact.url+"'>"+contact.url+"</a><br>"+
connectUrl+ "<b>"+qsTr("Created at")+":</b> "+createdAtDate.toLocaleString(Qt.locale())
onLinkActivated: {
@ -123,7 +123,7 @@ Rectangle{
text: "\uf0e6" //"Messages"
onClicked:{
root.currentIndex=0;
newstab.active=true;
//newstab.active=true;
root.messageSignal(contact) ;
contactLargeComponent.destroy();
}
@ -135,7 +135,7 @@ Rectangle{
text: "\uf040" //"DM"
onClicked:{
root.currentIndex=0;
newstab.active=true;
//newstab.active=true;
root.directmessageSignal(contact.screen_name);
contactLargeComponent.destroy();
}

View File

@ -126,6 +126,8 @@ Rectangle {
try {friendsModel.clear()} catch(e){print(e)};
Helperjs.readData(root.db,"contacts",login.username,function(friendsobject){
for (var i=0;i<friendsobject.length;i++){
friendsobject[i].description=Qt.atob(friendsobject[i].description);
friendsobject[i].name=Qt.atob(friendsobject[i].name);
if(Helperjs.getCount(db,login,"contacts","screen_name",friendsobject[i].screen_name)>1){
friendsobject[i].screen_name=friendsobject[i].screen_name+"+"+friendsobject[i].cid
}
@ -205,6 +207,8 @@ Rectangle {
try {contactsModel.clear()} catch(e){print(e)};
Helperjs.readData(db, "contacts",root.login.username,function(contactsobject){
for (var j=0;j<contactsobject.length;j++){
contactsobject[j].description=Qt.atob(contactsobject[j].description);
contactsobject[j].name=Qt.atob(contactsobject[j].name);
contactsModel.append({"contact":contactsobject[j]});
}
},"isFriend",0,"screen_name ASC");
@ -220,6 +224,8 @@ Rectangle {
try {contactsModel.clear()} catch(e){print(e)};
Helperjs.readData(db, "contacts",root.login.username,function(contactsobject){
for (var j=0;j<contactsobject.length;j++){
contactsobject[j].description=Qt.atob(contactsobject[j].description);
contactsobject[j].name=Qt.atob(contactsobject[j].name);
contactsModel.append({"contact":contactsobject[j]});
}
},"isFriend",0,"screen_name ASC");

View File

@ -42,7 +42,7 @@ import "qrc:/qml/genericqml"
TabView{
id:root
property QtObject osSettings: {var tmp=Qt.createComponent("qrc:/qml/configqml/OSSettingsAndroid.qml");return tmp.createObject(root)}
IntentReceiver{}
//IntentReceiver{}
tabPosition: Qt.BottomEdge
width: osSettings.appWidth
height:osSettings.appHeight
@ -88,16 +88,16 @@ TabView{
xhr.setContactlist(contactnames);
xhr.setImagedir(login.imagestore);
xhr.getlist();
Service.processNews(function(){
root.contactLoadType="";
root.news=[];
})
// Service.processNews(function(){
// root.contactLoadType="";
// root.news=[];
// })
}
else if (contactLoadType!=""){
Service.processNews(function(){
root.contactLoadType="";
root.news=[];
})}
// else if (contactLoadType!=""){
// Service.processNews(function(){
// root.contactLoadType="";
// root.news=[];
// })}
}
Connections{
@ -146,7 +146,7 @@ TabView{
frameOverlap: 1
tab: Rectangle {
color: styleData.selected?"sky blue":"light blue"
border.color: "light grey"
//border.color: "light grey"
implicitWidth: root.width/5
implicitHeight: 5*mm
Text { id: text
@ -192,11 +192,9 @@ TabView{
id: configtab
source: (root.currentIndex==4)?"qrc:/qml/configqml/ConfigTab.qml":""
}
// Component.onCompleted: {
// var imagePicker = Qt.createQmlObject('import QtQuick 2.0; import "qrc:/qml/genericqml";'+
// osSettings.imagePickQml+'{multiple : true; onReady: {'+
// 'if(imageUrls.length==1){root.currentIndex=0;newstab.active=true;root.uploadSignal(imageUrls)} else{'+
// ' root.currentIndex=2;fotostab.active=true;'+
// 'root.uploadSignal(imageUrls)};}}',root,"imagePicker");
// }
Component.onCompleted: {
if(osSettings.imagePickQml=="ImagePicker"){var component = Qt.createComponent("qrc:/qml/genericqml/IntentReceiver.qml");
var IntentReceiverQml = component.createObject(root)
}
}
}

View File

@ -34,10 +34,10 @@ Rectangle{
id: blueButton
width: Math.max(mainText.width+2*mm,8*mm)
height: 5*mm
color:"light blue"
color:"light blue"//"#EFEAEA" "sky blue"
property alias fontColor: mainText.color
border.color:"grey"
border.width:1
// border.color:"grey"
// border.width:1
radius: mm
property alias text: mainText.text
signal clicked

View File

@ -0,0 +1,83 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
// Copyright (C) 2017 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
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// In addition, as a special exception, the copyright holders give
// permission to link the code of portions of this program with the
// OpenSSL library under certain conditions as described in each
// individual source file, and distribute linked combinations including
// the two.
//
// You must obey the GNU General Public License in all respects for all
// of the code used other than OpenSSL. If you modify file(s) with this
// exception, you may extend this exception to your version of the
// file(s), but you are not obligated to do so. If you do not wish to do
// so, delete this exception statement from your version. If you delete
// this exception statement from all source files in the program, then
// also delete it here.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.7
import QtQuick.Controls 1.2
import "qrc:/qml/genericqml"
import "qrc:/js/news.js" as Newsjs
import "qrc:/js/helper.js" as Helperjs
import "qrc:/js/service.js" as Service
Item {
id:searchComponent
onVisibleChanged: if (visible) searchText.forceActiveFocus()
// border.color: "#EEEEEE"
// border.width: 1
// color:"lightgrey"
// width:conversationView.width
// height:Math.max(replyText.contentHeight+2*mm,6*mm)
Rectangle{
color: "white"
radius:0.5*mm
anchors.left: parent.left
anchors.leftMargin:mm
anchors.top:parent.top
anchors.topMargin: 0.5*mm
width:parent.width-2*mm
height:Math.max( searchText.contentHeight,5*mm)
TextInput {
id: searchText
font.pixelSize: 3*mm
wrapMode: Text.Wrap
anchors.fill: parent
selectByMouse: true
cursorVisible: false
onEditingFinished: search(displayText)
//onHeightChanged: newsView.contentY+=4.5*mm
}
// BlueButton {
// id: sendButton
// text: "\uf002"
// anchors.left: parent.right
// anchors.leftMargin:mm
// anchors.top:parent.top
// //anchors.topMargin: 0.5*mm
// color:"white"
// onClicked: {
// var body=searchText.getText(0,searchText.length);
// search(body)
// }
// }
}
}

View File

@ -126,14 +126,19 @@ Rectangle {
xhr.clearParams();
xhr.setLogin(login.username+":"+Qt.atob(login.password));
if (conversationModel.get(0).newsitemobject.messagetype==0){
//xhr.url= login.server + "/api/statuses/update.json";
xhr.setUrl(login.server);
xhr.setApi("/api/statuses/update");
xhr.setParam("source", "Friendiqa");
xhr.url= login.server + "/api/statuses/update.json";
xhr.setParam("status", body);
xhr.setParam("in_reply_to_status_id", conversationModel.get(conversationModel.count-1).newsitemobject.status_id)}
else {xhr.url= login.server + "/api/direct_messages/new.json";
xhr.setParam("in_reply_to_status_id", conversationModel.get(conversationModel.count-1).newsitemobject.id)}
else {//xhr.url= login.server + "/api/direct_messages/new.json";
xhr.setUrl(login.server);
xhr.setApi("/api/direct_messages/new");
xhr.setParam("text", body);
xhr.setParam("screen_name",conversationModel.get(conversationModel.count-1).newsitemobject.screen_name);
xhr.setParam("replyto", conversationModel.get(conversationModel.count-1).newsitemobject.status_id)
xhr.setParam("replyto", conversationModel.get(conversationModel.count-1).newsitemobject.id)
}
xhr.post();
} catch(e){Helperjs.showMessage("Error",e.toString(),root)}

View File

@ -77,7 +77,7 @@ Rectangle {
font.pixelSize: 3*mm
anchors.left: contactImage.right
anchors.margins: 1*mm
text:Qt.atob(contact.name)
text:contact.name
}
MouseArea{

View File

@ -0,0 +1,51 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
// Copyright (C) 2017 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
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// In addition, as a special exception, the copyright holders give
// permission to link the code of portions of this program with the
// OpenSSL library under certain conditions as described in each
// individual source file, and distribute linked combinations including
// the two.
//
// You must obey the GNU General Public License in all respects for all
// of the code used other than OpenSSL. If you modify file(s) with this
// exception, you may extend this exception to your version of the
// file(s), but you are not obligated to do so. If you do not wish to do
// so, delete this exception statement from your version. If you delete
// this exception statement from all source files in the program, then
// also delete it here.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.0
Rectangle {
id:hasgtagRectangle
color: "light grey"
property alias text: hashtagText.text
radius:0.3*mm
width:hashtagText.contentWidth+mm
height:2.5* mm
Text{
id:hashtagText
font.pixelSize: 1.5*mm
anchors.centerIn: parent
anchors.margins: 0.5*mm
}
MouseArea{
anchors.fill: parent
onClicked:{search(hashtagText.text.replace("#",""))}
}
}

View File

@ -39,12 +39,11 @@ import "qrc:/js/smiley.js" as Smileyjs
import "qrc:/qml/genericqml"
Flickable{
Rectangle{
color:"white"
width:root.width-5*mm
height:root.height-12*mm
contentHeight: messageColumn.height
boundsBehavior: Flickable.StopAtBounds
id:messageSend
//anchors.fill: parent
property string parentId: ""
property string reply_to_user:""
property alias bodyMessage: bodyField.text
@ -57,15 +56,17 @@ Flickable{
property var group_allow:login.permissions[2]
property var group_deny:login.permissions[3]
function attachImage(url){
function attachImage(url){ print("attachImage "+url)
var imageAttachmentObject=Qt.createQmlObject('import QtQuick 2.0; Image {id:imageAttachment'+attachImageURLs.length+'; source:"'+
url.toString()+'"; x:2*mm; width: 45*mm; height: 45*mm;fillMode: Image.PreserveAspectFit;MouseArea{anchors.fill:parent;onClicked:{attachImageURLs.splice(attachImageURLs.indexOf("'+
url+'"),1); imageAttachment'+attachImageURLs.length+'.destroy()}}}',messageColumn,"attachedImage");
}
function statusUpdate(title,status,in_reply_to_status_id,attachImageURL) {
xhr.url= login.server + "/api/statuses/update.json";
//xhr.url= login.server + "/api/statuses/update.json";
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/statuses/update");
xhr.clearParams();
xhr.setParam("source", "Friendiqa");
xhr.setParam("status", status);
@ -80,17 +81,27 @@ Flickable{
}
function dmUpdate(title,text,replyto,screen_name,attachImageURL) {
xhr.url= login.server + "/api/direct_messages/new.json";
//xhr.url= login.server + "/api/direct_messages/new.json";
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/direct_messages/new");
xhr.clearParams();
xhr.setParam("text", text);
xhr.setParam("screen_name", screen_name);
if (parentId!="") {xhr.setParam("replyto", replyto)};
if (title!=="") {xhr.setParam("title", title)};
//if (title!=="") {xhr.setParam("title", title)};
xhr.post();
}
Column {
Flickable{
anchors.fill: parent
contentHeight: messageColumn.height
boundsBehavior: Flickable.StopAtBounds
id:messageSend
Column {
id:messageColumn
spacing: 0.5*mm
width: parent.width
@ -98,7 +109,7 @@ Flickable{
id: titleField
width: parent.width
placeholderText: qsTr("Title (optional)")
visible: messageSend.parentId === ""
visible: parentId === ""
}
Rectangle{
@ -236,3 +247,4 @@ Flickable{
}
Component.onCompleted: if(attachImageURLs.length>0){attachImage(attachImageURLs[0])}
}
}

View File

@ -31,64 +31,98 @@
import QtQuick 2.0
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.4
import QtQuick.Dialogs 1.3
import "qrc:/qml/genericqml"
import "qrc:/js/news.js" as Newsjs
import "qrc:/js/helper.js" as Helperjs
import "qrc:/js/service.js" as Service
//import AndroidNative 1.0
Item {
Connections{
target:newstab
onNewstabstatusChanged:{
newstabstatusButton.text= qsTr(newstab.newstabstatus)
// switch(newstab.newstabstatus){
// case "Timeline": newstabstatusCombo.currentIndex=1; break;
// case "Conversations":newstabstatusCombo.currentIndex=2; break;
// case "Favorites":newstabstatusCombo.currentIndex=3; break;
// case "Network":newstabstatusCombo.currentIndex=4; break;
// case "Direct Messages":newstabstatusCombo.currentIndex=5; break;
// case "Notifications":newstabstatusCombo.currentIndex=6; break;
// case "Search":newstabstatusCombo.currentIndex=7; break;
// case "Groupnews":newstabstatusCombo.currentIndex=8; break;
// }
}
}
Connections{
target:xhr
// onError:{if (data=="contact"){downloadNotice.text=root.newContacts[root.currentContact].name+"... Error!"}}
onSuccess:{replytimer.start() //wait 1 second to load new timeline
onError:{
Helperjs.showMessage(qsTr("Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root);
}
onSuccess:{
// downloadNotice.text=downloadNotice.text+ "\n xhr finished "+Date.now();
Service.processNews(api,data);
}
}
Timer {id:replytimer; interval: 1000; running: false; repeat: false
onTriggered: {
if(newstab.newstabstatus=="Conversation"){
showConversation(newsStack.timelineIndex-1,newsModel.get(0).newsitemobject)}
else{
var onlynew=true;
Newsjs.getFriendsTimeline(login,db,contactlist,onlynew,newstab,function(rns,rnc){
Service.updateView(newstab.newstabstatus)
root.contactLoadType="news";
root.news=rns;root.newContacts=rnc;})
}
}
}
Timer {id:contacttimer; interval: 50; running: false; repeat: false
onTriggered: {
// downloadNotice.text=downloadNotice.text + "\n contactTimer start "+ Date.now()
root.newContacts=Newsjs.findNewContacts(root.news,root.contactlist);
Newsjs.storeNews(login,db,root.news,root)
}
}
function showNews(newsToShow){
try{if (newsStack.depth>1){newsStack.pop()}}catch(e){}
newsBusy.running=false;
var currentTime= new Date();
downloadNotice.text="";
var msg = {'currentTime': currentTime, 'model': newsModel,'news':newsToShow};
// downloadNotice.text=downloadNotice.text + "\n shownews start "+ Date.now();
//print("appendnews "+newsStack.appendNews +JSON.stringify(newsToShow))
var msg = {'currentTime': currentTime, 'model': newsModel,'news':newsToShow,'appendnews':newsStack.appendNews};
newsWorker.sendMessage(msg);
newsStack.appendNews=false
}
function showConversation(conversationIndex,newsitemobject){
//newsBusy.running=true;
root.contactLoadType="conversation";
newsStack.conversationIndex= conversationIndex;
//print(newsitemobject.id);
if(newsitemobject.messagetype==0){
Newsjs.requestConversation(root.login,db,newsitemobject.status_id,root.contactlist,root,function(ns,nc){
root.news=ns;root.newContacts=nc;
})}
else{Newsjs.conversationfromdb(root.db,root.login.username,newsitemobject.statusnet_conversation_id, function(newsarray){
root.news=newsarray;root.newContacts=[];
})}
xhr.clearParams();
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/conversation/show");
xhr.setParam("id",newsitemobject.id)
xhr.get();
}
else{
xhr.clearParams();
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/direct_messages/conversation");
xhr.setParam("uri",newsitemobject.statusnet_conversation_id)
xhr.get();
}
}
function showContact(contact){
@ -98,6 +132,21 @@ Item {
}
}
function search(term){print("Search "+term)
if (term!=""){
newstab.newstabstatus="Search";
newsBusy.running=true;
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/search");
xhr.clearParams();
xhr.setParam("q",term)
xhr.get();}
newsSearch.visible=false;
newsView.anchors.topMargin=7*mm
}
function onFriendsMessages(friend){
newstab.newstabstatus="Contact"
Newsjs.newsfromdb(db,root.login.username, function(dbnews){
@ -132,18 +181,163 @@ Item {
id: newsStack
anchors.fill:parent
property int conversationIndex: 0
property bool appendNews: false
property var allchats: ({})
initialItem:Rectangle {
id:newslistRectangle
y:1
color: "white"
// ComboBox{
// id:newstabstatusCombo
// anchors.top: parent.top
// anchors.topMargin: 0.5*mm
// width: 1/3*root.width
// height: 5*mm;
// style:
// ComboBoxStyle{
// background: Rectangle {
// color:"light blue"
// radius: 0.5*mm
// }
// label: Text {
// verticalAlignment: Text.AlignVCenter
// horizontalAlignment: Text.AlignHCenter
// text: control.currentText
// }
// }
// model: ListModel {
// id: newscomboItems
// ListElement { type: "Timeline"; text: qsTr("Timeline")}
// ListElement { type: "Conversations";text: qsTr("Conversations")}
// ListElement { type: "Favorites";text: qsTr("Favorites") }
// ListElement { type: "PublicTimeline";text: qsTr("Public timeline") }
// ListElement { type: "DirectMessages";text: qsTr("Direct Messages") }
// ListElement { type: "Notifications";text: qsTr("Notifications") }
// ListElement { type: "Search";text: qsTr("Search") }
// ListElement { type: "Groupnews"; text: qsTr("Group News") }
// ListElement { type: "Quit";text: qsTr("Quit") }
// }
// currentIndex:(login.newsViewType=="Timeline")?0:1
// onCurrentIndexChanged:{
// //onActivated:{
// print(newscomboItems.get(currentIndex).type);
// switch(newscomboItems.get(currentIndex).type){
// case "Timeline":
// newstab.newstabstatus="Timeline";
// newsModel.clear();
// try{ Newsjs.newsfromdb(root.db,root.login.username, function(dbnews){
// showNews(dbnews)
// })}catch(e){Helperjs.showMessage("Error",e,root)}
// break;
// case "Conversations":
// newsModel.clear();
// newstab.newstabstatus="Conversations";
// Newsjs.chatsfromdb(db,root.login.username,function(news){showNews(news)})
// break;
// case "Favorites":
// newstab.newstabstatus="Favorites";
// root.contactLoadType="favorites";
// Service.updateView("Favorites");
// break;
// case "PublicTimeline":
// newstab.newstabstatus="Network";
// Service.updateView("Network");
// break;
// case "DirectMessages":
// newstab.newstabstatus="DirectMessages";
// Service.updateView("DirectMessages");
// break;
// case "Notifications":
// newstab.newstabstatus="Notifications";
// Service.updateView("Notifications");
// break;
// case "Search":
// newsView.anchors.topMargin=18*mm;
// newsSearch.visible=true
// break;
// case "Groupnews":
// Service.showGroups();
// break;
// case "Quit":
// Service.cleanNews(root.db,function(){
// Service.cleanContacts(root.login,root.db,function(){
// Qt.quit()})
// })
// }
// }
// }
BlueButton{
id:newstabstatusButton
anchors.top: parent.top
anchors.topMargin: 0.5*mm
text: qsTr(newstab.newstabstatus)
onClicked: {newstabmenu.popup()}
Menu{id:newstabmenu
MenuItem {
text: qsTr("Timeline")
onTriggered: {
newstab.newstabstatus="Timeline";
newsModel.clear();
try{ Newsjs.newsfromdb(root.db,root.login.username, function(dbnews){
showNews(dbnews)
})}catch(e){Helperjs.showMessage("Error",e,root)}}
}
MenuItem {
text: qsTr("Conversations")
onTriggered:{
newsModel.clear();
newstab.newstabstatus="Conversations";
Newsjs.chatsfromdb(db,root.login.username,function(news){showNews(news)})
}
}
MenuItem {
text: qsTr("Favorites")
onTriggered:{
newstab.newstabstatus="Favorites";
// root.contactLoadType="favorites";
Service.updateView("Favorites")
}
}
MenuItem {
text: qsTr("Public timeline")
onTriggered:{
newstab.newstabstatus="Public Timeline";
Service.updateView("Public Timeline")
}
}
MenuItem {
text: qsTr("Direct Messages")
onTriggered:{
newstab.newstabstatus="Direct Messages";
Service.updateView("Direct Messages")
}
}
MenuItem {
text: qsTr("Notifications")
onTriggered:{
newstab.newstabstatus="Notifications";
Service.updateView("Notifications")
}
}
MenuItem {
text: qsTr("Group news")
onTriggered:Service.showGroups();
}
MenuItem {
text: qsTr("Quit")
onTriggered:{
Service.cleanNews(root.db,function(){
Service.cleanContacts(root.login,root.db,function(){
Qt.quit()})
})
}
}
}
}
Row{
@ -152,6 +346,20 @@ Item {
anchors.topMargin: 0.5*mm
anchors.right: parent.right
BlueButton {
id: searchButton
text: "\uf002"
onClicked: {
if (newsSearch.visible==false){
newsView.anchors.topMargin=18*mm;
newsSearch.visible=true}
else{
newsSearch.visible=false;
newsView.anchors.topMargin=7*mm;
}
}
}
BlueButton {
id: newMessageButton
text: "\uf040"
@ -166,32 +374,20 @@ Item {
},"isFriend",1);
}
}
BlueButton {
id: quitButton
text: "\uf08b"
onClicked: {Service.cleanNews(root.db,function(){
Service.cleanContacts(root.login,root.db,function(){
Qt.quit() })
})}
}
// BlueButton {
// id: quitButton
// text: "\uf08b"
// onClicked: {Service.cleanNews(root.db,function(){
// Service.cleanContacts(root.login,root.db,function(){
// Qt.quit() })
// })}
// }
BlueButton {
id: update
text: "\uf021"
onClicked: {
newsBusy.running=true;
newstab.newstabstatus=login.newsViewType;
root.contactLoadType="news";
var onlynew=true;
//print("newstab "+ JSON.stringify(contactlist));
Newsjs.getFriendsTimeline(login,db,contactlist,onlynew,newstab,function(ns,nc){
root.news=ns;root.newContacts=nc;
if (ns.length==0){// update last 20 existing news for changes and likes
onlynew=false;
Newsjs.getFriendsTimeline(login,db,contactlist,onlynew,newstab,function(rns,rnc){
root.contactLoadType="news";
root.news=rns;root.newContacts=rnc;})
}
})
//root.contactLoadType="news";
Service.updateView(newstab.newstabstatus)
}
}
@ -211,7 +407,6 @@ Item {
onClicked:{
var currentTime= new Date();
var lastnews_id=newsModel.get(newsModel.count-1).newsitemobject.created_at;
print("Lastnews ID "+lastnews_id+Qt.atob(newsModel.get(newsModel.count-1).newsitemobject.statusnet_html))
if(newstab.newstabstatus=="Timeline"){
Newsjs.newsfromdb(root.db,root.login.username, function(news){
var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'appendnews':true};
@ -227,11 +422,27 @@ Item {
var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'appendnews':true};
newsWorker.sendMessage(msg);
},newsModel.get(newsModel.count-1).newsitemobject.uid,lastnews_id)}
}
else if (newstab.newstabstatus=="Notifications"){}
else{
newsStack.appendNews=true;
xhr.setParam("max_id",newsModel.get(newsModel.count-1).newsitemobject.id-1);
xhr.get()
}}
}
}
}
Rectangle{
id: newsSearch
color: "#FFFAFA"
y:8*mm
width:root.width
height: 8*mm
visible:false
Search{
anchors.fill: parent
anchors.margins: mm
}
}
ListView {
id: newsView
anchors.fill: parent
@ -245,19 +456,9 @@ Item {
delegate: Newsitem{}
//onContentYChanged:{if(contentY<-8*mm&&contentY>(-8*mm-1)){print("refreshing");
onDragEnded:{if(contentY<-5*mm){//print("refreshing");
newsBusy.running=true;
newstab.newstabstatus=login.newsViewType;
root.contactLoadType="news";
var onlynew=true;
Newsjs.getFriendsTimeline(login,db,contactlist,onlynew,newstab,function(ns,nc){
root.news=ns;root.newContacts=nc;
if (ns.length==0){// update last 20 existing news for changes and likes
onlynew=false;
Newsjs.getFriendsTimeline(login,db,contactlist,onlynew,newstab,function(rns,rnc){
root.contactLoadType="news";
root.news=rns;root.newContacts=rnc;})
}
})
Service.updateView(newstab.newstabstatus)
}}
}
@ -299,67 +500,23 @@ Item {
text:""
}
}
Menu {
id:newstabmenu
MenuItem {
text: qsTr("Timeline")
onTriggered: {
newstab.newstabstatus="Timeline";
newsModel.clear();
try{ Newsjs.newsfromdb(root.db,root.login.username, function(dbnews){
showNews(dbnews)
})}catch(e){Helperjs.showMessage("Error",e,root)}}
}
MenuItem {
text: qsTr("Favorites")
onTriggered:{
newstab.newstabstatus="Favorites";
root.contactLoadType="favorites";
newsBusy.running=true;
Newsjs.requestFavorites(root.login,db,root.contactlist,root,function(ns,nc){
root.news=ns; root.newContacts=nc;
})
}
}
MenuItem {
text: qsTr("Conversations")
onTriggered:{
newsModel.clear();
newstab.newstabstatus="Conversations";
Newsjs.chatsfromdb(db,root.login.username,function(news){showNews(news)})
}
}
MenuItem {
text: qsTr("Notifications")
onTriggered:{
newstab.newstabstatus="Notifications";
newsBusy.running=true;
Newsjs.getNotifications(root.login,db,root,function(news){
showNews(news)}
)}
}
}
Component.onCompleted: {
root.messageSignal.connect(onFriendsMessages);
root.directmessageSignal.connect(onDirectMessage);
root.newsSignal.connect(showNews);
root.uploadSignal.connect(sendUrls);
root.sendtextSignal.connect(sendtext);
try{newsModel.clear()} catch(e){}
//print("imageUrls "+JSON.stringify(imageUrls)+" newsstack.depth:"+newsStack.depth);
//newsStack.push({item:"qrc:/qml/newsqml/MessageSend.qml",properties:{attachImageURLs:[imageUrl]}})
// var imagePicker = Qt.createQmlObject('import QtQuick 2.0; import "qrc:/qml/genericqml";'+
// osSettings.imagePickQml+'{multiple : true; onReady: {'+
// 'if(imageUrls.length==1){root.currentIndex=0;newstab.active=true;root.uploadSignal(imageUrls)} else{'+
// ' root.currentIndex=2;fotostab.active=true;'+
// 'root.uploadSignal(imageUrls)};}}',newstab,"imagePicker");
//SystemDispatcher.setInitialized();
root.messageSignal.connect(onFriendsMessages);
root.directmessageSignal.connect(onDirectMessage);
root.newsSignal.connect(showNews);
root.uploadSignal.connect(sendUrls);
root.sendtextSignal.connect(sendtext);
try{newsModel.clear()} catch(e){}
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
if(root.news.length>0){showNews(root.news)}
else{ newstab.newstabstatus=login.newsViewType;
if(login.newsViewType=="Timeline"){Newsjs.newsfromdb(db,login.username,function(dbnews){showNews(dbnews)})}
else{Newsjs.chatsfromdb(db,login.username,function(dbnews){showNews(dbnews)})}
if(login.newsViewType=="Timeline"){Newsjs.newsfromdb(db,login.username,function(dbnews){showNews(dbnews)})}
else{Newsjs.chatsfromdb(db,login.username,function(dbnews){showNews(dbnews)})}
}
if(osSettings.imagePickQml=="ImagePicker"){var component = Qt.createComponent("qrc:/qml/genericqml/IntentReceiver.qml");
var IntentReceiverQml = component.createObject(root)
}
}
}

View File

@ -52,6 +52,11 @@ Item {
var component = Qt.createComponent("qrc:/qml/newsqml/FriendicaActivities.qml");
var imagedialog = component.createObject(friendicaActivities,{"activitymembers": contacts});
}
function findTags(fulltext){
return fulltext.match(/\s+[#]+[A-Za-z0-9-_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]+/g)
}
Rectangle{width:newsitem.width; height: 1; anchors.bottom: newsitem.bottom; color:"light grey"}
Rectangle{
@ -72,7 +77,8 @@ Item {
height: 7*mm
MouseArea{
anchors.fill: parent
onClicked:{showContact(newsitemobject.user)}
onClicked:{
showContact(newsitemobject.user)}
}
onStatusChanged: if (profileImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
}
@ -82,7 +88,7 @@ Item {
width:parent.width
font.pixelSize: 1.5*mm
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
text: Qt.atob(newsitemobject.user.name)+forumname
text: newsitemobject.user.name+forumname
}
}
Column {
@ -143,7 +149,7 @@ Item {
linkColor: "light green"
id: itemMessage
textFormat: Text.RichText
text:Qt.atob(newsitemobject.statusnet_html)
text:newsitemobject.statusnet_html
width: newsitem.width-8*mm-2
height: Math.min(implicitHeight,3/4*root.height)
wrapMode: Text.Wrap
@ -151,6 +157,14 @@ Item {
onLinkActivated:{
Qt.openUrlExternally(link)}
Component.onCompleted:{
if (newsitemobject.messagetype==0){
var hashtags=[];
hashtags=findTags(newsitemobject.text);
var component = Qt.createComponent("qrc:/qml/newsqml/Hashtag.qml");
for (var tags in hashtags){
var hashtagQml = component.createObject(friendicaActivities,{"text":hashtags[tags].trim()});
}}
if (newsitemobject.attachmentList.length>0){
for(var attachments in newsitemobject.attachmentList){// (newsitemobject.attachmentList[attachments].url);
var attachcomponent = Qt.createQmlObject('import QtQuick 2.0; '+
@ -198,7 +212,7 @@ Item {
text: friendica_activities.likeText
MouseArea{
anchors.fill: parent
onClicked: { showActivityContacts(newsitemobject.like)}
onClicked: { showActivityContacts(newsitemobject.friendica_activities.like)}
}
}
Label{color: "grey"
@ -207,7 +221,7 @@ Item {
text: friendica_activities.dislikeText
MouseArea{
anchors.fill: parent
onClicked: { showActivityContacts(newsitemobject.dislike)}
onClicked: { showActivityContacts(newsitemobject.friendica_activities.dislike)}
}
}
Label{color: "grey"
@ -216,7 +230,7 @@ Item {
text: friendica_activities.attendyesText
MouseArea{
anchors.fill: parent
onClicked: { showActivityContacts(newsitemobject.attendyes)}
onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendyes)}
}}
Label{color: "grey"
height:3.5*mm
@ -224,7 +238,7 @@ Item {
text: friendica_activities.attendnoText
MouseArea{
anchors.fill: parent
onClicked: { showActivityContacts(newsitemobject.attendno)}
onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendno)}
}
}
Label{color: "grey"
@ -233,7 +247,7 @@ Item {
text: friendica_activities.attendmaybeText
MouseArea{
anchors.fill: parent
onClicked: { showActivityContacts(newsitemobject.attendmaybe)}
onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendmaybe)}
}
}
Label{
@ -267,8 +281,8 @@ Item {
}
}
onClicked: {
if(likeCheckbox.checked==true){Newsjs.like(root.login,root.db,1,"like",newsitemobject.status_id,root);dislikeCheckbox.checked=false; model.friendica_activities.self.liked=0 }
else{Newsjs.like(root.login,root.db,0,"like",newsitemobject.status_id,root); model.friendica_activities.self.liked=1}}
if(likeCheckbox.checked==true){Newsjs.like(root.login,root.db,1,"like",newsitemobject.id,root);dislikeCheckbox.checked=false; model.friendica_activities.self.liked=0 }
else{Newsjs.like(root.login,root.db,0,"like",newsitemobject.id,root); model.friendica_activities.self.liked=1}}
}
CheckBox{
id: dislikeCheckbox
@ -289,8 +303,8 @@ Item {
}
}
onClicked: {
if (dislikeCheckbox.checked==true){Newsjs.like(root.login,root.db,1,"dislike",newsitemobject.status_id,root);likeCheckbox.checked=false; model.friendica_activities.self.disliked=0}
else {Newsjs.like(root.login,root.db,0,"dislike",newsitemobject.status_id,root); model.friendica_activities.self.disliked=1}}
if (dislikeCheckbox.checked==true){Newsjs.like(root.login,root.db,1,"dislike",newsitemobject.id,root);likeCheckbox.checked=false; model.friendica_activities.self.disliked=0}
else {Newsjs.like(root.login,root.db,0,"dislike",newsitemobject.id,root); model.friendica_activities.self.disliked=1}}
}
CheckBox {
@ -312,22 +326,23 @@ Item {
checked:(newsitemobject.favorited>0)
onClicked:{
if(favoritedCheckbox.checkedState==Qt.Checked){
Newsjs.favorite(login,true,newsitemobject.status_id,root); model.newsitemobject.favorited=1}
Newsjs.favorite(login,true,newsitemobject.id,root); model.newsitemobject.favorited=1}
else if(favoritedCheckbox.checkedState==Qt.Unchecked){
Newsjs.favorite(login,false,newsitemobject.status_id,root);model.newsitemobject.favorited=0}
Newsjs.favorite(login,false,newsitemobject.id,root);model.newsitemobject.favorited=0}
}
}
Rectangle{
width: 10*mm
height: 4*mm
visible:(newsitemobject.messagetype!==2)
color:"transparent"
Text{
id:newsmenusymbol
color: "grey"
anchors.centerIn: parent
font.pixelSize: 2*mm
font.bold: true
text: "\u22EE"
font.pixelSize: 2.5*mm
font.family:fontAwesome.name
text: "\uf142"
}
MouseArea{
anchors.fill:parent
@ -336,7 +351,7 @@ Item {
Rectangle{
width: 10*mm
height: 4*mm
visible:newstab.newstabstatus!="Conversation"
visible:(newsitemobject.messagetype!==2)&&(newstab.newstabstatus!="Conversation")
color:"transparent"
Text{
id:conversationsymbol
@ -365,7 +380,7 @@ Item {
onTriggered: {
var directmessage=0;
if (newsitemobject.messagetype==1){ directmessage=1}
newsStack.push({item:"qrc:/qml/newsqml/MessageSend.qml",properties:{"reply_to_user": newsitemobject.user.screen_name,"parentId":newsitemobject.status_id,"login":root.login,"directmessage":directmessage}});
newsStack.push({item:"qrc:/qml/newsqml/MessageSend.qml",properties:{"reply_to_user": newsitemobject.user.screen_name,"parentId":newsitemobject.id,"login":root.login,"directmessage":directmessage}});
}
}
MenuItem {
@ -377,7 +392,7 @@ Item {
MenuItem {
text: qsTr("Repost")
onTriggered: {
Newsjs.retweetNews(root.login,db,newsitemobject.status_id,root,function(reply){
Newsjs.retweetNews(root.login,db,newsitemobject.id,root,function(reply){
Helperjs.showMessage("Repost",qsTr("Success!"),root)
})
}
@ -396,17 +411,17 @@ Item {
title: qsTr("Attending")
MenuItem{
text:qsTr("yes")
onTriggered: {Newsjs.attend(root.login,db,"yes",newsitemobject.status_id,root,function(){
onTriggered: {Newsjs.attend(root.login,db,"yes",newsitemobject.id,root,function(){
model.friendica_activities.self.attending="yes";attending="yes"})
}
}
MenuItem{text:qsTr("maybe")
onTriggered: {Newsjs.attend(root.login,db,"maybe",newsitemobject.status_id,root,function(){
onTriggered: {Newsjs.attend(root.login,db,"maybe",newsitemobject.id,root,function(){
model.friendica_activities.self.attending="maybe";attending="maybe"})
}
}
MenuItem{text:qsTr("no")
onTriggered: {Newsjs.attend(root.login,db,"no",newsitemobject.status_id,root,function(){
onTriggered: {Newsjs.attend(root.login,db,"no",newsitemobject.id,root,function(){
model.friendica_activities.self.attending="no";attending="no"})}
}
}
@ -414,7 +429,7 @@ Item {
MenuItem {
text: qsTr("Delete")
onTriggered: {
Newsjs.deleteNews(root.login,root.db,newsitemobject.status_id,newsitemobject.messagetype,root,function(reply){
Newsjs.deleteNews(root.login,root.db,newsitemobject.id,newsitemobject.messagetype,root,function(reply){
var msg = {'deleteId': index, 'model': newsModel};
newsWorker.sendMessage(msg);
})

View File

@ -104,7 +104,7 @@ Package {
Component.onCompleted:{
try {photoModel.clear()}catch (e){print(e)}
if(foreignPicture){
Imagejs.newRequestFriendsPictures(login,albumlink,friend,remoteContact,remoteauth,root,function(obj){
Imagejs.newRequestFriendsPictures(login,albumlink,friend,photoStack.remoteContact,remoteauth,root,function(obj){
if (obj) {
for (var k=0;k<obj.length;k++){
photoModel.append({"imageLocation": obj[k].thumb,"photoDescription":obj[k].name,"photoLink":obj[k].link})

View File

@ -17,76 +17,76 @@
<context>
<name>ConfigTab</name>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="78"/>
<location filename="../qml/configqml/ConfigTab.qml" line="362"/>
<location filename="../qml/configqml/ConfigTab.qml" line="384"/>
<location filename="../qml/configqml/ConfigTab.qml" line="69"/>
<location filename="../qml/configqml/ConfigTab.qml" line="351"/>
<location filename="../qml/configqml/ConfigTab.qml" line="374"/>
<source>User</source>
<translation>Name</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="105"/>
<location filename="../qml/configqml/ConfigTab.qml" line="96"/>
<source>Server</source>
<translation>Server</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="109"/>
<location filename="../qml/configqml/ConfigTab.qml" line="100"/>
<source>Nickname</source>
<translation>Kurzname</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="114"/>
<location filename="../qml/configqml/ConfigTab.qml" line="105"/>
<source>Password</source>
<translation>Passwort</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="118"/>
<location filename="../qml/configqml/ConfigTab.qml" line="109"/>
<source>Image dir.</source>
<translation>Bildverz.</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="123"/>
<location filename="../qml/configqml/ConfigTab.qml" line="114"/>
<source>Max. News</source>
<translation>Max. Nachr.</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="127"/>
<location filename="../qml/configqml/ConfigTab.qml" line="118"/>
<source>News as</source>
<translation>Anzeige</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="131"/>
<location filename="../qml/configqml/ConfigTab.qml" line="122"/>
<source>Interval (0=None)</source>
<translation>Intervall (0=keins)</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="201"/>
<location filename="../qml/configqml/ConfigTab.qml" line="316"/>
<location filename="../qml/configqml/ConfigTab.qml" line="340"/>
<location filename="../qml/configqml/ConfigTab.qml" line="188"/>
<location filename="../qml/configqml/ConfigTab.qml" line="304"/>
<location filename="../qml/configqml/ConfigTab.qml" line="328"/>
<source>Error</source>
<translation>Fehler</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="201"/>
<location filename="../qml/configqml/ConfigTab.qml" line="188"/>
<source>Nickname not registered at given server!</source>
<translation>Name auf der Seite nicht registriert!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="301"/>
<location filename="../qml/configqml/ConfigTab.qml" line="289"/>
<source>Confirm</source>
<translation>Bestätigen</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="305"/>
<location filename="../qml/configqml/ConfigTab.qml" line="293"/>
<source>No server given! </source>
<translation>Kein Server angegeben!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="306"/>
<location filename="../qml/configqml/ConfigTab.qml" line="294"/>
<source>No nickname given! </source>
<translation>Kein Kurzname angegeben!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="307"/>
<location filename="../qml/configqml/ConfigTab.qml" line="295"/>
<source>Nickname not registered at given server! </source>
<translation>Name auf der Seite nicht registriert!</translation>
</message>
@ -95,42 +95,42 @@
<translation type="vanished">Kein Nutzername angegeben!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="308"/>
<location filename="../qml/configqml/ConfigTab.qml" line="296"/>
<source>No password given! </source>
<translation>Kein Passwort angegeben!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="309"/>
<location filename="../qml/configqml/ConfigTab.qml" line="297"/>
<source>No image directory given!</source>
<translation>Kein Verzeichnis für Bilder angegeben!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="310"/>
<location filename="../qml/configqml/ConfigTab.qml" line="298"/>
<source>No maximum news number given!</source>
<translation>Maximale News-Anzahl nicht angegeben!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="316"/>
<location filename="../qml/configqml/ConfigTab.qml" line="304"/>
<source>Wrong password!</source>
<translation>Falsches Passwort!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="335"/>
<location filename="../qml/configqml/ConfigTab.qml" line="323"/>
<source>Success</source>
<translation>Bestätigt</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="335"/>
<location filename="../qml/configqml/ConfigTab.qml" line="323"/>
<source>Name</source>
<translation>Name</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="399"/>
<location filename="../qml/configqml/ConfigTab.qml" line="389"/>
<source>Timeline</source>
<translation>Chronologisch</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="403"/>
<location filename="../qml/configqml/ConfigTab.qml" line="393"/>
<source>Conversations</source>
<translation>Unterhaltungen</translation>
</message>
@ -189,12 +189,12 @@
<translation>Freunde</translation>
</message>
<message>
<location filename="../qml/contactqml/FriendsTab.qml" line="200"/>
<location filename="../qml/contactqml/FriendsTab.qml" line="202"/>
<source>Contacts</source>
<translation>Kontakte</translation>
</message>
<message>
<location filename="../qml/contactqml/FriendsTab.qml" line="253"/>
<location filename="../qml/contactqml/FriendsTab.qml" line="259"/>
<source>Groups</source>
<translation>Gruppen</translation>
</message>
@ -213,32 +213,37 @@
<context>
<name>ImageUploadDialog</name>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="127"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="100"/>
<source>Upload to album</source>
<translation>In Album hochladen</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="121"/>
<source>Album</source>
<translation>Album</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="132"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="126"/>
<source>Image</source>
<translation>Bild</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="137"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="131"/>
<source>Description</source>
<translation>Beschreibung</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="236"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="229"/>
<source>Upload</source>
<translation>Hochladen</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="239"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="232"/>
<source>Error</source>
<translation>Fehler</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="239"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="232"/>
<source> No album name given</source>
<translation>Kein Albumname angegeben</translation>
</message>
@ -246,17 +251,17 @@
<context>
<name>MessageSend</name>
<message>
<location filename="../qml/newsqml/MessageSend.qml" line="98"/>
<location filename="../qml/newsqml/MessageSend.qml" line="111"/>
<source>Title (optional)</source>
<translation>Überschrift (optional)</translation>
</message>
<message>
<location filename="../qml/newsqml/MessageSend.qml" line="180"/>
<location filename="../qml/newsqml/MessageSend.qml" line="190"/>
<source>Error</source>
<translation>Fehler</translation>
</message>
<message>
<location filename="../qml/newsqml/MessageSend.qml" line="180"/>
<location filename="../qml/newsqml/MessageSend.qml" line="190"/>
<source>Only one attachment supported at the moment.
Remove other attachment first!</source>
<translation>Nur ein Anhang derzeit unterstützt.
@ -270,30 +275,55 @@
<translation type="vanished">Lade Profilbild für </translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="204"/>
<location filename="../qml/newsqml/NewsTab.qml" line="404"/>
<source>More</source>
<translation>Mehr</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="301"/>
<location filename="../qml/newsqml/NewsTab.qml" line="281"/>
<source>Timeline</source>
<translation>Chronologisch</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="310"/>
<location filename="../qml/newsqml/NewsTab.qml" line="63"/>
<source>Error</source>
<translation>Fehler</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="298"/>
<source>Favorites</source>
<translation>Markierte News</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="322"/>
<location filename="../qml/newsqml/NewsTab.qml" line="290"/>
<source>Conversations</source>
<translation>Unterhaltungen</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="330"/>
<location filename="../qml/newsqml/NewsTab.qml" line="306"/>
<source>Public timeline</source>
<translation>Gemeinschaft</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="314"/>
<source>Direct Messages</source>
<translation>Direktnachrichten</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="321"/>
<source>Notifications</source>
<translation>Meldungen</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="328"/>
<source>Group news</source>
<translation>News Gruppe</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="332"/>
<source>Quit</source>
<translation>Schliessen</translation>
</message>
</context>
<context>
<name>Newsitem</name>
@ -303,77 +333,77 @@
<translation>Teilnahme</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="99"/>
<location filename="../qml/newsqml/Newsitem.qml" line="105"/>
<source>Source: </source>
<translation>Quelle: </translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="100"/>
<location filename="../qml/newsqml/Newsitem.qml" line="106"/>
<source>Direct Message</source>
<translation>Direktnachricht</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="115"/>
<location filename="../qml/newsqml/Newsitem.qml" line="121"/>
<source>In reply to </source>
<translation>Antwort an </translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="127"/>
<location filename="../qml/newsqml/Newsitem.qml" line="133"/>
<source> comments</source>
<translation> Kommentare</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="221"/>
<location filename="../qml/newsqml/Newsitem.qml" line="258"/>
<source>Attending: </source>
<translation>Teilnahme: </translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="343"/>
<location filename="../qml/newsqml/Newsitem.qml" line="378"/>
<source>Reply</source>
<translation>Antworten</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="351"/>
<location filename="../qml/newsqml/Newsitem.qml" line="386"/>
<source>DM</source>
<translation>Direktnachricht</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="357"/>
<location filename="../qml/newsqml/Newsitem.qml" line="392"/>
<source>Repost</source>
<translation>Teilen</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="360"/>
<location filename="../qml/newsqml/Newsitem.qml" line="395"/>
<source>Success!</source>
<translation>Erledigt!</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="365"/>
<location filename="../qml/newsqml/Newsitem.qml" line="400"/>
<source>Conversation</source>
<translation>Unterhaltung</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="376"/>
<location filename="../qml/newsqml/Newsitem.qml" line="410"/>
<source>Attending</source>
<translation>Teilnahme</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="378"/>
<location filename="../qml/newsqml/Newsitem.qml" line="412"/>
<source>yes</source>
<translation>ja</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="383"/>
<location filename="../qml/newsqml/Newsitem.qml" line="417"/>
<source>maybe</source>
<translation>vielleicht</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="388"/>
<location filename="../qml/newsqml/Newsitem.qml" line="422"/>
<source>no</source>
<translation>nein</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="395"/>
<location filename="../qml/newsqml/Newsitem.qml" line="429"/>
<source>Delete</source>
<translation>Löschen</translation>
</message>
@ -394,28 +424,28 @@
<context>
<name>PhotoTab</name>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="115"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="121"/>
<source>&apos;s images</source>
<translation>s Bilder</translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="167"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="178"/>
<source>All Images</source>
<translation>Alle Bilder</translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="172"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="183"/>
<source>Only new</source>
<translation>Nur neue</translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="186"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="190"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="197"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="201"/>
<source>Own Images</source>
<translation>Eigene Bilder</translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="227"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="238"/>
<source>More</source>
<translation>Mehr</translation>
</message>
@ -613,32 +643,32 @@
<translation>Aktualisieren</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="206"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="208"/>
<source>profile id</source>
<translation>Profil-Nummer</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="229"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="232"/>
<source>Description</source>
<translation>Beschreibung</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="229"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="232"/>
<source>Location</source>
<translation>Ort</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="229"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="232"/>
<source>Posts</source>
<translation>Beiträge</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="230"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="233"/>
<source>URL</source>
<translation>Profilseite</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="231"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="234"/>
<source>Created at</source>
<translation>Erstellt</translation>
</message>
@ -714,27 +744,26 @@
<translation>Personen nehmen vielleicht teil.</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="77"/>
<location filename="../js/newsworker.js" line="78"/>
<source>yes</source>
<translation>ja</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="78"/>
<location filename="../js/newsworker.js" line="79"/>
<source>no</source>
<translation>nein</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="79"/>
<location filename="../js/newsworker.js" line="80"/>
<source>maybe</source>
<translation>vielleicht</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="95"/>
<location filename="../js/newsworker.js" line="96"/>
<source>seconds</source>
<translation>Sekunden</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="95"/>
<location filename="../js/newsworker.js" line="96"/>
<location filename="../js/newsworker.js" line="97"/>
<location filename="../js/newsworker.js" line="98"/>
@ -744,53 +773,64 @@
<location filename="../js/newsworker.js" line="102"/>
<location filename="../js/newsworker.js" line="103"/>
<location filename="../js/newsworker.js" line="104"/>
<location filename="../js/newsworker.js" line="105"/>
<source>ago</source>
<translation>her</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="96"/>
<location filename="../js/newsworker.js" line="97"/>
<source>minute</source>
<translation>Minute</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="97"/>
<location filename="../js/newsworker.js" line="98"/>
<source>minutes</source>
<translation>Minuten</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="98"/>
<location filename="../js/newsworker.js" line="99"/>
<source>hour</source>
<translation>Stunde</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="99"/>
<location filename="../js/newsworker.js" line="100"/>
<source>hours</source>
<translation>Stunden</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="100"/>
<location filename="../js/newsworker.js" line="101"/>
<source>day</source>
<translation>Tag</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="101"/>
<location filename="../js/newsworker.js" line="102"/>
<source>days</source>
<translation>Tage</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="102"/>
<location filename="../js/newsworker.js" line="103"/>
<source>month</source>
<translation>Monat</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="103"/>
<location filename="../js/newsworker.js" line="104"/>
<source>months</source>
<translation>Monate</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="104"/>
<location filename="../js/newsworker.js" line="105"/>
<source>years</source>
<translation></translation>
</message>
</context>
<context>
<name>service</name>
<message>
<location filename="../js/service.js" line="360"/>
<location filename="../js/service.js" line="362"/>
<location filename="../js/service.js" line="365"/>
<source>Error</source>
<translation>Fehler</translation>
</message>
</context>
</TS>

View File

@ -17,76 +17,76 @@
<context>
<name>ConfigTab</name>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="78"/>
<location filename="../qml/configqml/ConfigTab.qml" line="362"/>
<location filename="../qml/configqml/ConfigTab.qml" line="384"/>
<location filename="../qml/configqml/ConfigTab.qml" line="69"/>
<location filename="../qml/configqml/ConfigTab.qml" line="351"/>
<location filename="../qml/configqml/ConfigTab.qml" line="374"/>
<source>User</source>
<translation>Usuario</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="105"/>
<location filename="../qml/configqml/ConfigTab.qml" line="96"/>
<source>Server</source>
<translation>Servidor</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="109"/>
<location filename="../qml/configqml/ConfigTab.qml" line="100"/>
<source>Nickname</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="114"/>
<location filename="../qml/configqml/ConfigTab.qml" line="105"/>
<source>Password</source>
<translation>Contraseña</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="118"/>
<location filename="../qml/configqml/ConfigTab.qml" line="109"/>
<source>Image dir.</source>
<translation>Dir. de imágenes</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="123"/>
<location filename="../qml/configqml/ConfigTab.qml" line="114"/>
<source>Max. News</source>
<translation> Max. de noticias.</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="127"/>
<location filename="../qml/configqml/ConfigTab.qml" line="118"/>
<source>News as</source>
<translation>Noticias como</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="131"/>
<location filename="../qml/configqml/ConfigTab.qml" line="122"/>
<source>Interval (0=None)</source>
<translation>Intervalo (0=ningún)</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="201"/>
<location filename="../qml/configqml/ConfigTab.qml" line="316"/>
<location filename="../qml/configqml/ConfigTab.qml" line="340"/>
<location filename="../qml/configqml/ConfigTab.qml" line="188"/>
<location filename="../qml/configqml/ConfigTab.qml" line="304"/>
<location filename="../qml/configqml/ConfigTab.qml" line="328"/>
<source>Error</source>
<translation type="unfinished">Error</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="201"/>
<location filename="../qml/configqml/ConfigTab.qml" line="188"/>
<source>Nickname not registered at given server!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="301"/>
<location filename="../qml/configqml/ConfigTab.qml" line="289"/>
<source>Confirm</source>
<translation>Confirmar</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="305"/>
<location filename="../qml/configqml/ConfigTab.qml" line="293"/>
<source>No server given! </source>
<translation>¡Servidor no encontrado!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="306"/>
<location filename="../qml/configqml/ConfigTab.qml" line="294"/>
<source>No nickname given! </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="307"/>
<location filename="../qml/configqml/ConfigTab.qml" line="295"/>
<source>Nickname not registered at given server! </source>
<translation type="unfinished"></translation>
</message>
@ -95,42 +95,42 @@
<translation type="vanished">¡Usuario incorrecto!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="308"/>
<location filename="../qml/configqml/ConfigTab.qml" line="296"/>
<source>No password given! </source>
<translation>¡Contraseña incorrecta!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="309"/>
<location filename="../qml/configqml/ConfigTab.qml" line="297"/>
<source>No image directory given!</source>
<translation>¡No se ha encontrado el directorio de imágenes!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="310"/>
<location filename="../qml/configqml/ConfigTab.qml" line="298"/>
<source>No maximum news number given!</source>
<translation>¡ máximo de noticias incorrecto!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="316"/>
<location filename="../qml/configqml/ConfigTab.qml" line="304"/>
<source>Wrong password!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="335"/>
<location filename="../qml/configqml/ConfigTab.qml" line="323"/>
<source>Success</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="335"/>
<location filename="../qml/configqml/ConfigTab.qml" line="323"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="399"/>
<location filename="../qml/configqml/ConfigTab.qml" line="389"/>
<source>Timeline</source>
<translation>Cronología</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="403"/>
<location filename="../qml/configqml/ConfigTab.qml" line="393"/>
<source>Conversations</source>
<translation>Conversaciones</translation>
</message>
@ -189,12 +189,12 @@
<translation>Amigos</translation>
</message>
<message>
<location filename="../qml/contactqml/FriendsTab.qml" line="200"/>
<location filename="../qml/contactqml/FriendsTab.qml" line="202"/>
<source>Contacts</source>
<translation>Contactos</translation>
</message>
<message>
<location filename="../qml/contactqml/FriendsTab.qml" line="253"/>
<location filename="../qml/contactqml/FriendsTab.qml" line="259"/>
<source>Groups</source>
<translation>Grupos</translation>
</message>
@ -202,32 +202,37 @@
<context>
<name>ImageUploadDialog</name>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="127"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="100"/>
<source>Upload to album</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="121"/>
<source>Album</source>
<translation>álbum</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="132"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="126"/>
<source>Image</source>
<translation>imagen</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="137"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="131"/>
<source>Description</source>
<translation>Descripción</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="236"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="229"/>
<source>Upload</source>
<translation>Subir</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="239"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="232"/>
<source>Error</source>
<translation>Error</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="239"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="232"/>
<source> No album name given</source>
<translation>¡Nombre del álbum no encontrado!</translation>
</message>
@ -235,17 +240,17 @@
<context>
<name>MessageSend</name>
<message>
<location filename="../qml/newsqml/MessageSend.qml" line="98"/>
<location filename="../qml/newsqml/MessageSend.qml" line="111"/>
<source>Title (optional)</source>
<translation>Título (opcional)</translation>
</message>
<message>
<location filename="../qml/newsqml/MessageSend.qml" line="180"/>
<location filename="../qml/newsqml/MessageSend.qml" line="190"/>
<source>Error</source>
<translation>Error</translation>
</message>
<message>
<location filename="../qml/newsqml/MessageSend.qml" line="180"/>
<location filename="../qml/newsqml/MessageSend.qml" line="190"/>
<source>Only one attachment supported at the moment.
Remove other attachment first!</source>
<translation>Solo se admite adjuntar un solo archivo en este momento.
@ -259,30 +264,55 @@
<translation type="vanished">Descargar la imagen del perfil para </translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="204"/>
<location filename="../qml/newsqml/NewsTab.qml" line="404"/>
<source>More</source>
<translation>Mas</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="301"/>
<location filename="../qml/newsqml/NewsTab.qml" line="281"/>
<source>Timeline</source>
<translation>Cronología</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="310"/>
<location filename="../qml/newsqml/NewsTab.qml" line="63"/>
<source>Error</source>
<translation type="unfinished">Error</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="298"/>
<source>Favorites</source>
<translation>Favoritos</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="322"/>
<location filename="../qml/newsqml/NewsTab.qml" line="290"/>
<source>Conversations</source>
<translation>Conversaciones</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="330"/>
<location filename="../qml/newsqml/NewsTab.qml" line="306"/>
<source>Public timeline</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="314"/>
<source>Direct Messages</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="321"/>
<source>Notifications</source>
<translation>Notificaciones</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="328"/>
<source>Group news</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="332"/>
<source>Quit</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Newsitem</name>
@ -292,77 +322,77 @@
<translation>Asistiendo: </translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="99"/>
<location filename="../qml/newsqml/Newsitem.qml" line="105"/>
<source>Source: </source>
<translation>Fuente: </translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="100"/>
<location filename="../qml/newsqml/Newsitem.qml" line="106"/>
<source>Direct Message</source>
<translation>Mensaje directo</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="115"/>
<location filename="../qml/newsqml/Newsitem.qml" line="121"/>
<source>In reply to </source>
<translation>En respuesta a </translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="127"/>
<location filename="../qml/newsqml/Newsitem.qml" line="133"/>
<source> comments</source>
<translation> comentarios</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="221"/>
<location filename="../qml/newsqml/Newsitem.qml" line="258"/>
<source>Attending: </source>
<translation>Asistiendo: </translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="343"/>
<location filename="../qml/newsqml/Newsitem.qml" line="378"/>
<source>Reply</source>
<translation>Respuesta</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="351"/>
<location filename="../qml/newsqml/Newsitem.qml" line="386"/>
<source>DM</source>
<translation>Mensaje directo</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="357"/>
<location filename="../qml/newsqml/Newsitem.qml" line="392"/>
<source>Repost</source>
<translation>Volver a publicar</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="360"/>
<location filename="../qml/newsqml/Newsitem.qml" line="395"/>
<source>Success!</source>
<translation>éxito!</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="365"/>
<location filename="../qml/newsqml/Newsitem.qml" line="400"/>
<source>Conversation</source>
<translation>Conversación</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="376"/>
<location filename="../qml/newsqml/Newsitem.qml" line="410"/>
<source>Attending</source>
<translation>Asistiendo</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="378"/>
<location filename="../qml/newsqml/Newsitem.qml" line="412"/>
<source>yes</source>
<translation>si</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="383"/>
<location filename="../qml/newsqml/Newsitem.qml" line="417"/>
<source>maybe</source>
<translation>quizás</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="388"/>
<location filename="../qml/newsqml/Newsitem.qml" line="422"/>
<source>no</source>
<translation>no</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="395"/>
<location filename="../qml/newsqml/Newsitem.qml" line="429"/>
<source>Delete</source>
<translation>Borrar</translation>
</message>
@ -383,28 +413,28 @@
<context>
<name>PhotoTab</name>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="115"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="121"/>
<source>&apos;s images</source>
<translation>s Imágenes</translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="167"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="178"/>
<source>All Images</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="172"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="183"/>
<source>Only new</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="186"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="190"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="197"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="201"/>
<source>Own Images</source>
<translation>Mis imágenes</translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="227"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="238"/>
<source>More</source>
<translation>Mas</translation>
</message>
@ -602,32 +632,32 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="206"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="208"/>
<source>profile id</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="229"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="232"/>
<source>Description</source>
<translation type="unfinished">Descripción</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="229"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="232"/>
<source>Location</source>
<translation type="unfinished">Localización</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="229"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="232"/>
<source>Posts</source>
<translation type="unfinished">Mensajes</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="230"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="233"/>
<source>URL</source>
<translation type="unfinished">URL</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="231"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="234"/>
<source>Created at</source>
<translation type="unfinished">Creado en</translation>
</message>
@ -703,27 +733,26 @@
<translation>Personas que pueden asistir.</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="77"/>
<location filename="../js/newsworker.js" line="78"/>
<source>yes</source>
<translation>si</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="78"/>
<location filename="../js/newsworker.js" line="79"/>
<source>no</source>
<translation>no</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="79"/>
<location filename="../js/newsworker.js" line="80"/>
<source>maybe</source>
<translation>quizás</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="95"/>
<location filename="../js/newsworker.js" line="96"/>
<source>seconds</source>
<translation>Segundos</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="95"/>
<location filename="../js/newsworker.js" line="96"/>
<location filename="../js/newsworker.js" line="97"/>
<location filename="../js/newsworker.js" line="98"/>
@ -733,53 +762,64 @@
<location filename="../js/newsworker.js" line="102"/>
<location filename="../js/newsworker.js" line="103"/>
<location filename="../js/newsworker.js" line="104"/>
<location filename="../js/newsworker.js" line="105"/>
<source>ago</source>
<translation>hace</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="96"/>
<location filename="../js/newsworker.js" line="97"/>
<source>minute</source>
<translation>Minuto</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="97"/>
<location filename="../js/newsworker.js" line="98"/>
<source>minutes</source>
<translation>Minutos</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="98"/>
<location filename="../js/newsworker.js" line="99"/>
<source>hour</source>
<translation>Hora</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="99"/>
<location filename="../js/newsworker.js" line="100"/>
<source>hours</source>
<translation>Horas</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="100"/>
<location filename="../js/newsworker.js" line="101"/>
<source>day</source>
<translation>Dia</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="101"/>
<location filename="../js/newsworker.js" line="102"/>
<source>days</source>
<translation>Dias</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="102"/>
<location filename="../js/newsworker.js" line="103"/>
<source>month</source>
<translation>Mes</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="103"/>
<location filename="../js/newsworker.js" line="104"/>
<source>months</source>
<translation>Meses</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="104"/>
<location filename="../js/newsworker.js" line="105"/>
<source>years</source>
<translation>Años</translation>
</message>
</context>
<context>
<name>service</name>
<message>
<location filename="../js/service.js" line="360"/>
<location filename="../js/service.js" line="362"/>
<location filename="../js/service.js" line="365"/>
<source>Error</source>
<translation type="unfinished">Error</translation>
</message>
</context>
</TS>

View File

@ -17,76 +17,76 @@
<context>
<name>ConfigTab</name>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="78"/>
<location filename="../qml/configqml/ConfigTab.qml" line="362"/>
<location filename="../qml/configqml/ConfigTab.qml" line="384"/>
<location filename="../qml/configqml/ConfigTab.qml" line="69"/>
<location filename="../qml/configqml/ConfigTab.qml" line="351"/>
<location filename="../qml/configqml/ConfigTab.qml" line="374"/>
<source>User</source>
<translation>Utente</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="105"/>
<location filename="../qml/configqml/ConfigTab.qml" line="96"/>
<source>Server</source>
<translation>Server</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="109"/>
<location filename="../qml/configqml/ConfigTab.qml" line="100"/>
<source>Nickname</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="114"/>
<location filename="../qml/configqml/ConfigTab.qml" line="105"/>
<source>Password</source>
<translation>Password</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="118"/>
<location filename="../qml/configqml/ConfigTab.qml" line="109"/>
<source>Image dir.</source>
<translation>Directory immagini</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="123"/>
<location filename="../qml/configqml/ConfigTab.qml" line="114"/>
<source>Max. News</source>
<translation> Max. di notizie</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="127"/>
<location filename="../qml/configqml/ConfigTab.qml" line="118"/>
<source>News as</source>
<translation>News come</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="131"/>
<location filename="../qml/configqml/ConfigTab.qml" line="122"/>
<source>Interval (0=None)</source>
<translation>Intervallo (0=nessuno)</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="201"/>
<location filename="../qml/configqml/ConfigTab.qml" line="316"/>
<location filename="../qml/configqml/ConfigTab.qml" line="340"/>
<location filename="../qml/configqml/ConfigTab.qml" line="188"/>
<location filename="../qml/configqml/ConfigTab.qml" line="304"/>
<location filename="../qml/configqml/ConfigTab.qml" line="328"/>
<source>Error</source>
<translation type="unfinished">Errore</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="201"/>
<location filename="../qml/configqml/ConfigTab.qml" line="188"/>
<source>Nickname not registered at given server!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="301"/>
<location filename="../qml/configqml/ConfigTab.qml" line="289"/>
<source>Confirm</source>
<translation>Conferma</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="305"/>
<location filename="../qml/configqml/ConfigTab.qml" line="293"/>
<source>No server given! </source>
<translation>Nessun server inserito!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="306"/>
<location filename="../qml/configqml/ConfigTab.qml" line="294"/>
<source>No nickname given! </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="307"/>
<location filename="../qml/configqml/ConfigTab.qml" line="295"/>
<source>Nickname not registered at given server! </source>
<translation type="unfinished"></translation>
</message>
@ -95,42 +95,42 @@
<translation type="vanished">Nessun utente inserito!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="308"/>
<location filename="../qml/configqml/ConfigTab.qml" line="296"/>
<source>No password given! </source>
<translation>Nessuna password inserita!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="309"/>
<location filename="../qml/configqml/ConfigTab.qml" line="297"/>
<source>No image directory given!</source>
<translation>Nessuna directory immagini inserita!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="310"/>
<location filename="../qml/configqml/ConfigTab.qml" line="298"/>
<source>No maximum news number given!</source>
<translation>Nessun numero massimo di news inserito!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="316"/>
<location filename="../qml/configqml/ConfigTab.qml" line="304"/>
<source>Wrong password!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="335"/>
<location filename="../qml/configqml/ConfigTab.qml" line="323"/>
<source>Success</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="335"/>
<location filename="../qml/configqml/ConfigTab.qml" line="323"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="399"/>
<location filename="../qml/configqml/ConfigTab.qml" line="389"/>
<source>Timeline</source>
<translation>Cronologia</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="403"/>
<location filename="../qml/configqml/ConfigTab.qml" line="393"/>
<source>Conversations</source>
<translation>Conversazioni</translation>
</message>
@ -189,12 +189,12 @@
<translation>Amici</translation>
</message>
<message>
<location filename="../qml/contactqml/FriendsTab.qml" line="200"/>
<location filename="../qml/contactqml/FriendsTab.qml" line="202"/>
<source>Contacts</source>
<translation>Contatti</translation>
</message>
<message>
<location filename="../qml/contactqml/FriendsTab.qml" line="253"/>
<location filename="../qml/contactqml/FriendsTab.qml" line="259"/>
<source>Groups</source>
<translation>Gruppi</translation>
</message>
@ -202,32 +202,37 @@
<context>
<name>ImageUploadDialog</name>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="127"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="100"/>
<source>Upload to album</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="121"/>
<source>Album</source>
<translation>Album</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="132"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="126"/>
<source>Image</source>
<translation>Immagine</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="137"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="131"/>
<source>Description</source>
<translation>Descrizione</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="236"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="229"/>
<source>Upload</source>
<translation>Carica</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="239"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="232"/>
<source>Error</source>
<translation>Errore</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="239"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="232"/>
<source> No album name given</source>
<translation>Nessun nome album inserito!</translation>
</message>
@ -235,17 +240,17 @@
<context>
<name>MessageSend</name>
<message>
<location filename="../qml/newsqml/MessageSend.qml" line="98"/>
<location filename="../qml/newsqml/MessageSend.qml" line="111"/>
<source>Title (optional)</source>
<translation>Titolo (opzionale)</translation>
</message>
<message>
<location filename="../qml/newsqml/MessageSend.qml" line="180"/>
<location filename="../qml/newsqml/MessageSend.qml" line="190"/>
<source>Error</source>
<translation>Errore</translation>
</message>
<message>
<location filename="../qml/newsqml/MessageSend.qml" line="180"/>
<location filename="../qml/newsqml/MessageSend.qml" line="190"/>
<source>Only one attachment supported at the moment.
Remove other attachment first!</source>
<translation>Solo un allegato è attualmente supportato.
@ -259,30 +264,55 @@
<translation type="vanished">Download immagine profilo per </translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="204"/>
<location filename="../qml/newsqml/NewsTab.qml" line="404"/>
<source>More</source>
<translation>Ancora</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="301"/>
<location filename="../qml/newsqml/NewsTab.qml" line="281"/>
<source>Timeline</source>
<translation>Cronologia</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="310"/>
<location filename="../qml/newsqml/NewsTab.qml" line="63"/>
<source>Error</source>
<translation type="unfinished">Errore</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="298"/>
<source>Favorites</source>
<translation>Favoriti</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="322"/>
<location filename="../qml/newsqml/NewsTab.qml" line="290"/>
<source>Conversations</source>
<translation>Conversazioni</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="330"/>
<location filename="../qml/newsqml/NewsTab.qml" line="306"/>
<source>Public timeline</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="314"/>
<source>Direct Messages</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="321"/>
<source>Notifications</source>
<translation>Notifiche</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="328"/>
<source>Group news</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="332"/>
<source>Quit</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Newsitem</name>
@ -292,77 +322,77 @@
<translation>attendere: </translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="99"/>
<location filename="../qml/newsqml/Newsitem.qml" line="105"/>
<source>Source: </source>
<translation>Codice: </translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="100"/>
<location filename="../qml/newsqml/Newsitem.qml" line="106"/>
<source>Direct Message</source>
<translation>Messaggio diretto</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="115"/>
<location filename="../qml/newsqml/Newsitem.qml" line="121"/>
<source>In reply to </source>
<translation>In risposta a </translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="127"/>
<location filename="../qml/newsqml/Newsitem.qml" line="133"/>
<source> comments</source>
<translation> commenti</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="221"/>
<location filename="../qml/newsqml/Newsitem.qml" line="258"/>
<source>Attending: </source>
<translation>Attendi: </translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="343"/>
<location filename="../qml/newsqml/Newsitem.qml" line="378"/>
<source>Reply</source>
<translation>Risposta</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="351"/>
<location filename="../qml/newsqml/Newsitem.qml" line="386"/>
<source>DM</source>
<translation>Messaggio diretto</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="357"/>
<location filename="../qml/newsqml/Newsitem.qml" line="392"/>
<source>Repost</source>
<translation>Condividi</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="360"/>
<location filename="../qml/newsqml/Newsitem.qml" line="395"/>
<source>Success!</source>
<translation>Ha funzionato!</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="365"/>
<location filename="../qml/newsqml/Newsitem.qml" line="400"/>
<source>Conversation</source>
<translation>Conversazione</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="376"/>
<location filename="../qml/newsqml/Newsitem.qml" line="410"/>
<source>Attending</source>
<translation>Attendi</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="378"/>
<location filename="../qml/newsqml/Newsitem.qml" line="412"/>
<source>yes</source>
<translation>si</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="383"/>
<location filename="../qml/newsqml/Newsitem.qml" line="417"/>
<source>maybe</source>
<translation>potrebbe</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="388"/>
<location filename="../qml/newsqml/Newsitem.qml" line="422"/>
<source>no</source>
<translation>no</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="395"/>
<location filename="../qml/newsqml/Newsitem.qml" line="429"/>
<source>Delete</source>
<translation>Cancella</translation>
</message>
@ -383,28 +413,28 @@
<context>
<name>PhotoTab</name>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="115"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="121"/>
<source>&apos;s images</source>
<translation> Immagini</translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="167"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="178"/>
<source>All Images</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="172"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="183"/>
<source>Only new</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="186"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="190"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="197"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="201"/>
<source>Own Images</source>
<translation>Mie immagini</translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="227"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="238"/>
<source>More</source>
<translation>Ancora</translation>
</message>
@ -602,32 +632,32 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="206"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="208"/>
<source>profile id</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="229"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="232"/>
<source>Description</source>
<translation type="unfinished">Descrizione</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="229"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="232"/>
<source>Location</source>
<translation type="unfinished">Località</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="229"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="232"/>
<source>Posts</source>
<translation type="unfinished">Messaggi</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="230"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="233"/>
<source>URL</source>
<translation type="unfinished">URL</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="231"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="234"/>
<source>Created at</source>
<translation type="unfinished">Creato il</translation>
</message>
@ -703,27 +733,26 @@
<translation>Persone che possono attendere.</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="77"/>
<location filename="../js/newsworker.js" line="78"/>
<source>yes</source>
<translation>si</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="78"/>
<location filename="../js/newsworker.js" line="79"/>
<source>no</source>
<translation>no</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="79"/>
<location filename="../js/newsworker.js" line="80"/>
<source>maybe</source>
<translation>potrebbe</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="95"/>
<location filename="../js/newsworker.js" line="96"/>
<source>seconds</source>
<translation>secondi</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="95"/>
<location filename="../js/newsworker.js" line="96"/>
<location filename="../js/newsworker.js" line="97"/>
<location filename="../js/newsworker.js" line="98"/>
@ -733,53 +762,64 @@
<location filename="../js/newsworker.js" line="102"/>
<location filename="../js/newsworker.js" line="103"/>
<location filename="../js/newsworker.js" line="104"/>
<location filename="../js/newsworker.js" line="105"/>
<source>ago</source>
<translation>fa</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="96"/>
<location filename="../js/newsworker.js" line="97"/>
<source>minute</source>
<translation>minuti</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="97"/>
<location filename="../js/newsworker.js" line="98"/>
<source>minutes</source>
<translation>minuti</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="98"/>
<location filename="../js/newsworker.js" line="99"/>
<source>hour</source>
<translation>ora</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="99"/>
<location filename="../js/newsworker.js" line="100"/>
<source>hours</source>
<translation>ore</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="100"/>
<location filename="../js/newsworker.js" line="101"/>
<source>day</source>
<translation>giorno</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="101"/>
<location filename="../js/newsworker.js" line="102"/>
<source>days</source>
<translation>giorni</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="102"/>
<location filename="../js/newsworker.js" line="103"/>
<source>month</source>
<translation>mese</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="103"/>
<location filename="../js/newsworker.js" line="104"/>
<source>months</source>
<translation>mesi</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="104"/>
<location filename="../js/newsworker.js" line="105"/>
<source>years</source>
<translation>anni</translation>
</message>
</context>
<context>
<name>service</name>
<message>
<location filename="../js/service.js" line="360"/>
<location filename="../js/service.js" line="362"/>
<location filename="../js/service.js" line="365"/>
<source>Error</source>
<translation type="unfinished">Errore</translation>
</message>
</context>
</TS>

View File

@ -217,5 +217,9 @@
<file>js/image.js</file>
<file>qml/contactqml/ProfileComponent.qml</file>
<file>translations/friendiqa-it.ts</file>
<file>qml/genericqml/Search.qml</file>
<file>qml/newsqml/Hashtag.qml</file>
<file>qml/genericqml/IntentReceiver.qml</file>
</qresource>
</RCC>

View File

@ -73,6 +73,10 @@ QString FILESYSTEM::homePath() const
// return dir.exists();
//}
bool FILESYSTEM::fileexist(QString name)
{ return QFile::exists(name);
}
void FILESYSTEM::makeDir(QString name)
{
QDir dir(m_Directory);

View File

@ -65,6 +65,7 @@ signals:
void error(QString data, int code);
public slots:
bool fileexist(QString name);
void makeDir(QString name);
void rmDir();
void rmFile(QString name);

View File

@ -59,6 +59,14 @@ void XHR::setUrl(QString url)
}
}
void XHR::setApi(QString api)
{
if (api!=m_api) {
m_api = api;
emit apiChanged();
}
}
void XHR::setLogin(QString login)
{
if (login!=m_login) {
@ -111,6 +119,11 @@ QString XHR::url() const
return m_url;
}
QString XHR::api() const
{
return m_api;
}
QString XHR::login() const
{
return m_login;
@ -166,6 +179,7 @@ void XHR::download()
request.setRawHeader("Authorization", headerData.toLocal8Bit());
}
request.setUrl(requrl);
//qDebug() << requrl;
reply = manager.get(request);
reply->ignoreSslErrors();
connect(reply, &QNetworkReply::readyRead,this, &XHR::onReadyRead);
@ -185,9 +199,9 @@ void XHR::get()
query.addQueryItem(i.key(), i.value());
}
QUrl requrl(m_url);
QUrl requrl(m_url+m_api);
//qDebug() << requrl;
requrl.setQuery(query);
QByteArray loginData = m_login.toLocal8Bit().toBase64();
QString headerData = "Basic " + loginData;
request.setRawHeader("Authorization", headerData.toLocal8Bit());
@ -250,7 +264,7 @@ void XHR::post()
QString headerData = "Basic " + loginData;
request.setRawHeader(QByteArray("Authorization"), headerData.toLocal8Bit());
request.setUrl(m_url);
request.setUrl(m_url+m_api);
reply = manager.post(request, multiPart);
qDebug() << "\t request sent";
connect(reply, &QNetworkReply::finished, this, &XHR::onReplySuccess);
@ -263,7 +277,7 @@ void XHR::post()
void XHR::onReplyError(QNetworkReply::NetworkError code)
{
qDebug() << code;
emit this->error( bufferToString(), m_url, (int) code);
emit this->error( bufferToString(), m_url,m_api, (int) code);
buffer.clear();
reply->deleteLater();
}
@ -271,7 +285,7 @@ void XHR::onReplyError(QNetworkReply::NetworkError code)
void XHR::onReplySuccess()
{
qDebug() << "!";
emit this->success( bufferToString() );
emit this->success( bufferToString(), m_api);
buffer.clear();
// reply->deleteLater();
}
@ -279,7 +293,7 @@ void XHR::onReplySuccess()
void XHR::onRequestFinished()
{
// Save the file here
if (buffer.isNull()){qDebug() << "File empty"<<m_url; buffer.clear(); emit this->error(m_downloadtype,m_url,1);}
if (buffer.isNull()){qDebug() << "File empty"<<m_url; buffer.clear(); emit this->error(m_downloadtype,m_url,m_api,1);}
else if (m_downloadtype=="picturelist") {
QJsonDocument jsonResponse = QJsonDocument::fromJson(buffer);
QJsonObject jsonObject = jsonResponse.object();

View File

@ -56,6 +56,7 @@ public:
explicit XHR(QObject *parent = 0);
QString url() const;
QString api() const;
QString login() const;
QString filename() const;
QList<QString> contactlist() const;
@ -65,6 +66,7 @@ public:
signals:
void urlChanged();
void apiChanged();
void loginChanged();
void filenameChanged();
void contactlistChanged();
@ -73,11 +75,12 @@ signals:
void downloadtypeChanged();
void downloaded(QString type, QString url, QString filename, int i);
void downloadedjson(QString type, QString url, QString filename, int i,QJsonObject jsonObject);
void success(QString data);
void error(QString data, QString url, int code);
void success(QString data, QString api);
void error(QString data, QString url,QString api, int code);
public slots:
void setUrl(QString url);
void setApi(QString api);
void setLogin(QString login);
void setDownloadtype(QString downloadtype);
void setFilename(QString filename);
@ -103,6 +106,7 @@ private slots:
private:
QByteArray buffer;
QString m_url;
QString m_api;
QString m_login;
QString m_filename;
QString m_downloadtype;

View File

@ -51,3 +51,4 @@ DISTFILES += \
qml/photoqml/*.qml \
qml/configqml/*.qml \
js/*.js \
qml/newsqml/Hashtag.qml

View File

@ -37,7 +37,7 @@ function friendicaRequest(login,api,rootwindow,callback) {
xhrequest.onreadystatechange = function() {
if(xhrequest.readyState === XMLHttpRequest.DONE) {
try{
if (xhrequest.status=200){
if (xhrequest.status==200){
callback(xhrequest.responseText)
}else{
showMessage("Error","API:\n" +login.server+api+"\n NO RESPONSE"+xhrequest.statusText,rootwindow);
@ -65,7 +65,7 @@ function friendicaPostRequest(login,api,data,method,rootwindow,callback) {
callback(xhrequest.responseText)
}
}
catch (e){showMessage("Error", "API:\n" + +api+" "+e+"\n Return:"+xhrequest.responseText,rootwindow)}
catch (e){showMessage("Error", "API:\n" + api+" "+e+"\n Return:"+xhrequest.responseText,rootwindow)}
}
}
xhrequest.open(method, login.server+api,true,login.username,Qt.atob(login.password));
@ -151,7 +151,7 @@ var where = " AND "+ filter +" = '" + filtervalue+"'";
});
}
function showMessage(header,message,rootwindow){//print("message: "+message);
function showMessage(header,message,rootwindow){print("message: "+message);
var cleanmessage=message.replace(/"/g,"-"); //print(cleanmessage);
if(cleanmessage.length>200){cleanmessage=cleanmessage.slice(0,200)+'...'}
var messageString='import QtQuick 2.0; import QtQuick.Dialogs 1.2; MessageDialog{ visible: true; title:"'+header+'";standardButtons: StandardButton.Ok; text:" '+cleanmessage+'"}';

View File

@ -38,7 +38,7 @@ function requestFriends(login,database,rootwindow,callback){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
db.transaction( function(tx) {
var result = tx.executeSql('UPDATE contacts SET isFriend=0 where username="'+login.username+'"')}); // clean old friends
Helperjs.friendicaRequest(login,"/api/statuses/friends?count=9999", rootwindow,function (obj){
Helperjs.friendicaRequest(login,"/api/statuses/friends?count=9999", rootwindow,function (obj){
var friends=JSON.parse(obj);
for (var i=0;i<friends.length;i++){ friends[i].isFriend=1}
//try{requestProfile(login,friends,rootwindow,function(friends_profile){callback(friends_profile)})}
@ -47,8 +47,6 @@ function requestFriends(login,database,rootwindow,callback){
});
}
function requestGroups(login,database,rootwindow,callback){
// retrieve, save and return groups. Other features currently not implemented
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
@ -87,23 +85,34 @@ function deleteGroup(login,database,rootwindow,group, callback){
});
}})}
function getLastNews(login,database){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
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){};
return lastnewsid
})
}
function getFriendsTimeline(login,database,contacts,onlynew,rootwindow,callback){
// retrieve and return timeline since last news, return contacts which are not friends and older than 2 days for update (friends can be updated in Contactstab)
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
var parameter = "?count=50";
if(onlynew){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'); // check for last news id
try{parameter=parameter+"&since_id="+result.rows.item(0).status_id;}catch(e){};})}
var newContacts=[];
Helperjs.friendicaRequest(login,"/api/statuses/friends_timeline"+parameter, rootwindow,function (obj){
var news=JSON.parse(obj);
if (news.hasOwnProperty('status')){
Helperjs.showMessage(qsTr("Error"),"API:\n" +login.server+"/api/statuses/friends_timeline"+parameter+"\n Return: \n"+obj,rootwindow)
}
var newContacts=findNewContacts(news,contacts);
callback(news,newContacts)
})}
//function getFriendsTimeline(login,database,contacts,onlynew,rootwindow,callback){
// // retrieve and return timeline since last news, return contacts which are not friends and older than 2 days for update (friends can be updated in Contactstab)
// var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
// var parameter = "?count=50";
// if(onlynew){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'); // check for last news id
// try{parameter=parameter+"&since_id="+result.rows.item(0).status_id;}catch(e){};})}
// var newContacts=[];
// Helperjs.friendicaRequest(login,"/api/statuses/friends_timeline"+parameter, rootwindow,function (obj){
// var news=JSON.parse(obj);
// if (news.hasOwnProperty('status')){
// Helperjs.showMessage(qsTr("Error"),"API:\n" +login.server+"/api/statuses/friends_timeline"+parameter+"\n Return: \n"+obj,rootwindow)
// }
// var newContacts=findNewContacts(news,contacts);
// callback(news,newContacts)
//})}
function getCurrentContacts(login,database,callback){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
@ -121,7 +130,7 @@ function getCurrentContacts(login,database,callback){
contactlist.push(result2.rows.item(j).url )
}
})
callback(contactlist)
callback(contactlist)
}
function findNewContacts(news,contacts){
@ -132,7 +141,7 @@ function findNewContacts(news,contacts){
news[i].user.isFriend=0;
newContacts.push(news[i].user);
}
if (news[i].friendica_activities.like.length>0){
if (news[i].hasOwnProperty('friendica_activities') && news[i].friendica_activities.like.length>0){
for (var j=0;j<news[i].friendica_activities.like.length;j++){
var like_url=news[i].friendica_activities.like[j].url;
if(contacts.indexOf(like_url)==-1 && !(inArray(newContacts,"url",like_url))){
@ -141,7 +150,7 @@ function findNewContacts(news,contacts){
}
}
}
if (news[i].friendica_activities.dislike.length>0){
if (news[i].hasOwnProperty('friendica_activities') && news[i].friendica_activities.dislike.length>0){
for (var k=0;j<news[k].friendica_activities.dislike.length;k++){
var dislike_url=news[i].friendica_activities.dislike[k].url;
if(contacts.indexOf(dislike_url)==-1 && !(inArray(newContacts,"url",dislike_url))){
@ -151,118 +160,123 @@ function findNewContacts(news,contacts){
}
}
var owner_url=news[i].friendica_owner.url;
if(contacts.indexOf(owner_url)==-1 && !(inArray(newContacts,"url",owner_url))){
news[i].friendica_owner.isFriend=0;
newContacts.push(news[i].friendica_owner);
}
if(news[i].hasOwnProperty('friendica_owner')){
var owner_url=news[i].friendica_owner.url;
if(contacts.indexOf(owner_url)==-1 && !(inArray(newContacts,"url",owner_url))){
news[i].friendica_owner.isFriend=0;
newContacts.push(news[i].friendica_owner);
}
}
}
return newContacts
}
function storeNews(login,database,news,rootwindow,callback){
function storeNews(login,database,news,rootwindow){
// save news after contacts download, call next function
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
for (var i=0;i<news.length;i++){
//print('store news data for ' + news[i].id+JSON.stringify(news[i].friendica_activities));
//var ausdruck=news[i];
var likearray=[]; for (var user in news[i].friendica_activities.like){likearray.push(news[i].friendica_activities.like[user].url)}
var dislikearray=[]; for (var user in news[i].friendica_activities.dislike){dislikearray.push(news[i].friendica_activities.dislike[user].url)}
var attendyesarray=[]; for (var user in news[i].friendica_activities.attendyes){attendyesarray.push(news[i].friendica_activities.attendyes[user].url)}
var attendnoarray=[]; for (var user in news[i].friendica_activities.attendno){attendnoarray.push(news[i].friendica_activities.attendno[user].url)}
var attendmaybearray=[]; for (var user in news[i].friendica_activities.attendmaybe){attendmaybearray.push(news[i].friendica_activities.attendmaybe[user].url)}
var likearray=[];var dislikearray=[];var attendyesarray=[];var attendnoarray=[];var attendmaybearray=[];
if(news[i].hasOwnProperty('friendica_activities')){
for (var user in news[i].friendica_activities.like){likearray.push(news[i].friendica_activities.like[user].url)}
for (var user in news[i].friendica_activities.dislike){dislikearray.push(news[i].friendica_activities.dislike[user].url)}
for (var user in news[i].friendica_activities.attendyes){attendyesarray.push(news[i].friendica_activities.attendyes[user].url)}
for (var user in news[i].friendica_activities.attendno){attendnoarray.push(news[i].friendica_activities.attendno[user].url)}
for (var user in news[i].friendica_activities.attendmaybe){attendmaybearray.push(news[i].friendica_activities.attendmaybe[user].url)}
}
var friendica_activities=[likearray,dislikearray,attendyesarray,attendnoarray,attendmaybearray]
var attachments="";if (news[i].attachments){attachments=Qt.btoa(JSON.stringify(news[i].attachments))}
db.transaction( function(tx) {
var result = tx.executeSql('SELECT * from news where username="'+login.username+'" AND status_id = "'+news[i].id+'" AND messagetype=0'); // check for news id
if(result.rows.length === 1) {// use update
//print(news[i].id +' news exists, update it'+'UPDATE news SET username="'+login.username+'", messagetype=0, text="'+Qt.btoa(news[i].text)+'", created_at="'+Date.parse(cleanDate(news[i].created_at))+'", in_reply_to_status_id="'+news[i].in_reply_to_status_id+'", source="'+news[i].source+'", status_id="'+news[i].id+'", in_reply_to_user_id="'+news[i].in_reply_to_user_id+'", geo="'+news[i].geo+'", favorited="'+news[i].favorited+'", uid="'+news[i].user.id+'", statusnet_html="'+Qt.btoa(news[i].status_html)+'", statusnet_conversation_id="'+news[i].statusnet_conversation_id+'",friendica_activities="'+Qt.btoa(JSON.stringify(friendica_activities))+'",attachments="'+attachments+'",friendica_owner="'+news[i].friendica_owner.url+'" where username="'+login.username+'" AND status_id="'+news[i].status_id+'" AND messagetype=0')
result = tx.executeSql('UPDATE news SET username="'+login.username+'", messagetype=0, text="'+Qt.btoa(news[i].text)+'", created_at="'+Date.parse(cleanDate(news[i].created_at))+'", in_reply_to_status_id="'+news[i].in_reply_to_status_id+'", source="'+news[i].source+'", status_id="'+news[i].id+'", in_reply_to_user_id="'+news[i].in_reply_to_user_id+'", geo="'+news[i].geo+'", favorited="'+news[i].favorited+'", uid="'+news[i].user.id+'", statusnet_html="'+Qt.btoa(news[i].status_html)+'", statusnet_conversation_id="'+news[i].statusnet_conversation_id+'",friendica_activities="'+Qt.btoa(JSON.stringify(friendica_activities))+'",attachments="'+attachments+'",friendica_owner="'+news[i].friendica_owner.url+'" where username="'+login.username+'" AND status_id="'+news[i].status_id+'" AND messagetype=0');
result = tx.executeSql('UPDATE news SET username="'+login.username+'", messagetype=0, text="'+Qt.btoa(news[i].text)+'", created_at="'+news[i].created_at+'", in_reply_to_status_id="'+news[i].in_reply_to_status_id+'", source="'+news[i].source+'", status_id="'+news[i].id+'", in_reply_to_user_id="'+news[i].in_reply_to_user_id+'", geo="'+news[i].geo+'", favorited="'+news[i].favorited+'", uid="'+news[i].user.id+'", statusnet_html="'+Qt.btoa(news[i].status_html)+'", statusnet_conversation_id="'+news[i].statusnet_conversation_id+'",friendica_activities="'+Qt.btoa(JSON.stringify(friendica_activities))+'",attachments="'+attachments+'",friendica_owner="'+news[i].friendica_owner.url+'" where username="'+login.username+'" AND status_id="'+news[i].status_id+'" AND messagetype=0');
} else {// use insert
result = tx.executeSql('INSERT INTO news (username,messagetype,text,created_at,in_reply_to_status_id,source,status_id,in_reply_to_user_id,geo,favorited,uid,statusnet_html,statusnet_conversation_id,friendica_activities,friendica_activities_self,attachments,friendica_owner) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)', [login.username,0,Qt.btoa(news[i].text),Date.parse(cleanDate(news[i].created_at)), news[i].in_reply_to_status_id, news[i].source, news[i].id,news[i].in_reply_to_user_id,news[i].geo,news[i].favorited, news[i].user.id,Qt.btoa(news[i].statusnet_html),news[i].statusnet_conversation_id, Qt.btoa(JSON.stringify(friendica_activities)),"[]",attachments,news[i].friendica_owner.url])}})
result = tx.executeSql('INSERT INTO news (username,messagetype,text,created_at,in_reply_to_status_id,source,status_id,in_reply_to_user_id,geo,favorited,uid,statusnet_html,statusnet_conversation_id,friendica_activities,friendica_activities_self,attachments,friendica_owner) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)', [login.username,0,Qt.btoa(news[i].text),news[i].created_at, news[i].in_reply_to_status_id, news[i].source, news[i].id,news[i].in_reply_to_user_id,news[i].geo,news[i].favorited, news[i].user.id,Qt.btoa(news[i].statusnet_html),news[i].statusnet_conversation_id, Qt.btoa(JSON.stringify(friendica_activities)),"[]",attachments,news[i].friendica_owner.url])}})
}
getDirectMessage(login,database,rootwindow,callback)
// getDirectMessage(login,database,rootwindow,callback)
}
function getDirectMessage(login,database,rootwindow,callback){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
var parameter = "";
db.transaction( function(tx) {
var result = tx.executeSql('SELECT status_id from news WHERE username="'+login.username+'" AND messagetype=1 ORDER BY status_id DESC LIMIT 1'); // check for last news id
try{parameter="&since_id="+result.rows.item(0).status_id;}catch(e){};})
Helperjs.friendicaRequest(login,"/api/direct_messages/all"+parameter,rootwindow, function (obj){
var messages=JSON.parse(obj);
for (var i=0;i<messages.length;i++){
//print('store message data for '+JSON.stringify(messages[i]));
db.transaction( function(tx) {
var result = tx.executeSql('SELECT * from news where username= "'+login.username+'" AND status_id = "'+messages[i].id+'" AND messagetype=1'); // check for news id
if(result.rows.length === 1) {// use update
print(messages[i].id +' directmessage exists, update it')
result = tx.executeSql('UPDATE news SET username="'+login.username+'", messagetype=1, text="'+Qt.btoa(messages[i].text)+'", created_at="'+Date.parse(cleanDate(messages[i].created_at))+'", source="Friendica", status_id="'+messages[i].id+'", uid="'+messages[i].sender.id+'", statusnet_html="'+Qt.btoa(messages[i].text)+'", statusnet_conversation_id="'+messages[i].friendica_parent_uri+'" where username="'+login.username+'" AND status_id="'+messages[i].status_id+'" AND messagetype=1');
} else {// use insert
result = tx.executeSql('INSERT INTO news (username,messagetype,text,created_at,source,status_id,uid,statusnet_html,statusnet_conversation_id) VALUES (?,?,?,?,?,?,?,?,?)', [login.username,1,Qt.btoa(messages[i].text),Date.parse(cleanDate(messages[i].created_at)), "Friendica", messages[i].id, messages[i].sender.id,Qt.btoa(messages[i].text),messages[i].friendica_parent_uri])}
});
}
})
callback()
// if(login.newsViewType=="Timeline"){newsfromdb(database,login.username,callback)}
// else{chatsfromdb(database,login.username,callback)}
}
//function getDirectMessage(login,database,rootwindow,callback){
// var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
// var parameter = "";
// db.transaction( function(tx) {
// var result = tx.executeSql('SELECT status_id from news WHERE username="'+login.username+'" AND messagetype=1 ORDER BY status_id DESC LIMIT 1'); // check for last news id
// try{parameter="&since_id="+result.rows.item(0).status_id;}catch(e){};})
// Helperjs.friendicaRequest(login,"/api/direct_messages/all"+parameter,rootwindow, function (obj){
// var messages=JSON.parse(obj);
// for (var i=0;i<messages.length;i++){
// //print('store message data for '+JSON.stringify(messages[i]));
// db.transaction( function(tx) {
// var result = tx.executeSql('SELECT * from news where username= "'+login.username+'" AND status_id = "'+messages[i].id+'" AND messagetype=1'); // check for news id
// if(result.rows.length === 1) {// use update
// print(messages[i].id +' directmessage exists, update it')
// result = tx.executeSql('UPDATE news SET username="'+login.username+'", messagetype=1, text="'+Qt.btoa(messages[i].text)+'", created_at="'+Date.parse(cleanDate(messages[i].created_at))+'", source="Friendica", status_id="'+messages[i].id+'", uid="'+messages[i].sender.id+'", statusnet_html="'+Qt.btoa(messages[i].text)+'", statusnet_conversation_id="'+messages[i].friendica_parent_uri+'" where username="'+login.username+'" AND status_id="'+messages[i].status_id+'" AND messagetype=1');
// } else {// use insert
// result = tx.executeSql('INSERT INTO news (username,messagetype,text,created_at,source,status_id,uid,statusnet_html,statusnet_conversation_id) VALUES (?,?,?,?,?,?,?,?,?)', [login.username,1,Qt.btoa(messages[i].text),Date.parse(cleanDate(messages[i].created_at)), "Friendica", messages[i].id, messages[i].sender.id,Qt.btoa(messages[i].text),messages[i].friendica_parent_uri])}
// });
// }
// })
// callback()
//// if(login.newsViewType=="Timeline"){newsfromdb(database,login.username,callback)}
//// else{chatsfromdb(database,login.username,callback)}
//}
function getNotifications(login,database,rootwindow,callback){
Helperjs.friendicaRequest(login,"/api/friendica/notifications", rootwindow,function (obj){
var messages=JSON.parse(obj);
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
for (var i=0;i<messages.length;i++){
//print('store message data for '+JSON.stringify(messages[i]));
db.transaction( function(tx) {
var result = tx.executeSql('SELECT * from news where username="'+login.username+'" AND status_id = "'+messages[i].id+'" AND messagetype=2'); // check for news id
if(result.rows.length === 1) {// use update
print(messages[i].id +' Notification exists, update it')
result = tx.executeSql('UPDATE news SET username="'+login.username+'", messagetype=2, text="'+Qt.btoa(messages[i].msg_html)+'", created_at="'+Date.parse(messages[i].date)+'", source="Friendica", status_id="'+messages[i].id+'", uid="'+messages[i].uid+'", statusnet_html="'+Qt.btoa(messages[i].msg_html)+'", statusnet_conversation_id="'+messages[i].parent+'" where username="'+login.username+'" AND status_id="'+messages[i].id+'" AND messagetype=2');
} else {// use insert
result = tx.executeSql('INSERT INTO news (username,messagetype,text,created_at,source,status_id, uid,statusnet_html,statusnet_conversation_id) VALUES (?,?,?,?,?,?,?,?,?)', [login.username,2,Qt.btoa(messages[i].msg_html),Date.parse(messages[i].date),"Friendica", messages[i].id, messages[i].uid,Qt.btoa(messages[i].msg_html),messages[i].parent])}
});
}
db.transaction( function(tx) {
var newsrs=tx.executeSql('select * from news WHERE username="'+login.username+'" AND messagetype=2 ORDER BY status_id DESC LIMIT 20');
var newsArray=[];
for(var j = 0; j < newsrs.rows.length; j++) {
newsArray.push(newsrs.rows.item(j));
callback(newsArray);
}
})
})}
function getActivitiesUserData(database,username,allcontacts,userUrlArray){//print(JSON.stringify(userUrlArray));
//function getNotifications(login,database,rootwindow,callback){
// Helperjs.friendicaRequest(login,"/api/friendica/notifications", rootwindow,function (obj){
// var messages=JSON.parse(obj);
// var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
// for (var i=0;i<messages.length;i++){
// //print('store message data for '+JSON.stringify(messages[i]));
// db.transaction( function(tx) {
// var result = tx.executeSql('SELECT * from news where username="'+login.username+'" AND status_id = "'+messages[i].id+'" AND messagetype=2'); // check for news id
// if(result.rows.length === 1) {// use update
// print(messages[i].id +' Notification exists, update it')
// result = tx.executeSql('UPDATE news SET username="'+login.username+'", messagetype=2, text="'+Qt.btoa(messages[i].msg_html)+'", created_at="'+Date.parse(messages[i].date)+'", source="Friendica", status_id="'+messages[i].id+'", uid="'+messages[i].uid+'", statusnet_html="'+Qt.btoa(messages[i].msg_html)+'", statusnet_conversation_id="'+messages[i].parent+'" where username="'+login.username+'" AND status_id="'+messages[i].id+'" AND messagetype=2');
// } else {// use insert
// result = tx.executeSql('INSERT INTO news (username,messagetype,text,created_at,source,status_id, uid,statusnet_html,statusnet_conversation_id) VALUES (?,?,?,?,?,?,?,?,?)', [login.username,2,Qt.btoa(messages[i].msg_html),Date.parse(messages[i].date),"Friendica", messages[i].id, messages[i].uid,Qt.btoa(messages[i].msg_html),messages[i].parent])}
// });
// }
// db.transaction( function(tx) {
// var newsrs=tx.executeSql('select * from news WHERE username="'+login.username+'" AND messagetype=2 ORDER BY status_id DESC LIMIT 20');
// var newsArray=[];
// for(var j = 0; j < newsrs.rows.length; j++) {
// newsArray.push(newsrs.rows.item(j));
// newsArray[j].statusnet_html=Qt.atob(newsArray[j].statusnet_html);
// callback(newsArray);
// }
// })
//})}
function getActivitiesUserData(allcontacts,userUrlArray){//print(JSON.stringify(userUrlArray));
var helpArray=[];
for (var i=0;i<userUrlArray.length;i++){
helpArray.push(objFromArray(allcontacts,"url",userUrlArray[i]));
// Helperjs.readData(database,"contacts",username,function(userdata){
// helpArray.push(userdata[0]);
// },"url",userUrlArray[i]);
}
return helpArray
}
function newsfromdb(database,username,callback,contact,stop_time){
function newsfromdb(database,user,callback,contact,stop_time){
// return news before stop_time (used by More button), in brackets of 20 entries, or by specified contact
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
db.transaction( function(tx) {
if (!stop_time){var stop="";
try{var rs = tx.executeSql('select created_at from news WHERE username="'+username+'" ORDER BY created_at DESC LIMIT 1');
try{var rs = tx.executeSql('select created_at from news WHERE username="'+user+'" ORDER BY created_at DESC LIMIT 1');
stop="<="+rs.rows.item(0).created_at}catch(e){stop="<99999999999999"}}
else{var stop="<"+stop_time}
var contactfilter="";if(contact){contactfilter=" AND (uid='"+contact+"' OR friendica_owner='"+contact+"')"}
//print('select * from news WHERE username="'+username+'" AND created_at'+stop+contactfilter+' ORDER BY created_at DESC LIMIT 20');
var newsrs=tx.executeSql('select * from news WHERE username="'+username+'" AND created_at'+stop+contactfilter+' ORDER BY created_at DESC LIMIT 20');
var newsrs=tx.executeSql('select * from news WHERE username="'+user+'" AND created_at'+stop+contactfilter+' ORDER BY created_at DESC LIMIT 20');
var newsArray=[];
var allcontacts=[];
Helperjs.readData(database,"contacts",username,function(obj){allcontacts=obj});
var allcontacts=getAllContacts(database,user);
for(var i = 0; i < newsrs.rows.length; i++) {
newsArray.push(newsrs.rows.item(i));
newsArray[i]=fetchUsersForNews(database,username,newsArray[i],allcontacts)
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]=fetchUsersForNews(database,user,newsArray[i],allcontacts);
if (newsArray[i].attachments!==null){newsArray[i].attachments=JSON.parse(Qt.atob(newsArray[i].attachments))};
}
callback(newsArray)});
}
@ -270,33 +284,21 @@ function newsfromdb(database,username,callback,contact,stop_time){
function fetchUsersForNews(database,username,news,allcontacts){//print(JSON.stringify(news))
news.user=objFromArray(allcontacts,"id",news.uid);
if(news.in_reply_to_user_id){news.reply_user=objFromArray(allcontacts,"id",news.in_reply_to_user_id)}
news.friendica_owner_object=objFromArray(allcontacts,"url",news.friendica_owner);
// Helperjs.readData(database,"contacts",username,function(userdata){
// news.user=userdata[0];
// //print("Fetch user"+JSON.stringify(news.user));
// },"id",news.uid);
// if(news.in_reply_to_user_id){
// Helperjs.readData(database,"contacts",username,function(replytodata){
// news.reply_user=replytodata[0];
// //print("Fetch reply to"+JSON.stringify(news.reply_user));
// },"id",news.in_reply_to_user_id);
// }
if (news.messagetype==0){
for(var j=0;j<news.friendica_activities.length;j++)
{var friendicaArray=JSON.parse(Qt.atob(news.friendica_activities));
// print("Array: "+friendicaArray[1]);
news.like=getActivitiesUserData(database,username,allcontacts,friendicaArray[0]);
news.dislike=getActivitiesUserData(database,username,allcontacts,friendicaArray[1]);
news.attendyes=getActivitiesUserData(database,username,allcontacts,friendicaArray[2]);
news.attendno=getActivitiesUserData(database,username,allcontacts,friendicaArray[3]);
news.attendmaybe=getActivitiesUserData(database,username,allcontacts,friendicaArray[4]);
}
// Helperjs.readData(database,"contacts",username,function(friendica_owner_data){
// news.friendica_owner_object=friendica_owner_data[0];
// //print("Fetch friendica_owner"+JSON.stringify(news.friendica_owner));
// },"url",news.friendica_owner);
}
return news
//news.friendica_owner_object=objFromArray(allcontacts,"url",news.friendica_owner);
news.friendica_owner=objFromArray(allcontacts,"url",news.friendica_owner);
if (news.messagetype==0){
var friendicaArray=JSON.parse(Qt.atob(news.friendica_activities));
delete news.friendica_activities;
news.friendica_activities={};
//for(var j=0;j<friendicaArray.length;j++){
news.friendica_activities.like=getActivitiesUserData(allcontacts,friendicaArray[0]);
news.friendica_activities.dislike=getActivitiesUserData(allcontacts,friendicaArray[1]);
news.friendica_activities.attendyes=getActivitiesUserData(allcontacts,friendicaArray[2]);
news.friendica_activities.attendno=getActivitiesUserData(allcontacts,friendicaArray[3]);
news.friendica_activities.attendmaybe=getActivitiesUserData(allcontacts,friendicaArray[4]);
//}
}
return news
}
function deleteNews(login,database,newsid,messagetype,rootwindow,callback){
@ -401,11 +403,14 @@ function conversationfromdb(database,user,conversationId,callback){
db.transaction( function(tx) {
var newsrs=tx.executeSql('select * from news WHERE username="'+user+'" AND statusnet_conversation_id="'+conversationId+'" ORDER BY created_at ASC');
var newsArray=[];
var allcontacts=[];
Helperjs.readData(database,"contacts",user,function(obj){allcontacts=obj});
var allcontacts=getAllContacts(database,user);
for(var i = 0; i < newsrs.rows.length; i++) {
newsArray.push(newsrs.rows.item(i));
newsArray[i]=fetchUsersForNews(database,user,newsArray[i],allcontacts)
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]=fetchUsersForNews(database,user,newsArray[i],allcontacts);
if (newsArray[i].attachments!==null){newsArray[i].attachments=JSON.parse(Qt.atob(newsArray[i].attachments))};
}
callback(newsArray)})
}
@ -419,19 +424,21 @@ function requestFavorites(login,database,contacts,rootwindow,callback){
callback(news,newContacts)
})}
function favoritesfromdb(database,user,callback){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
db.transaction( function(tx) {
//print('select * from news WHERE username="'+user+'" AND favorited=1 ORDER BY status_id DESC');
var newsrs=tx.executeSql('select * from news WHERE username="'+user+'" AND favorited=1 ORDER BY status_id DESC');
var newsArray=[];
var allcontacts=[];
Helperjs.readData(database,"contacts",user,function(obj){allcontacts=obj});
for(var i = 0; i < newsrs.rows.length; i++) {
newsArray.push(newsrs.rows.item(i));
newsArray[i]=fetchUsersForNews(database,user,newsArray[i],allcontacts);
callback(newsArray);
}})}
//function favoritesfromdb(database,user,callback){
// var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
// db.transaction( function(tx) {
// //print('select * from news WHERE username="'+user+'" AND favorited=1 ORDER BY status_id DESC');
// var newsrs=tx.executeSql('select * from news WHERE username="'+user+'" AND favorited=1 ORDER BY status_id DESC');
// var newsArray=[];
// var allcontacts=getAllContacts(database,user);
// for(var i = 0; i < newsrs.rows.length; i++) {
// newsArray.push(newsrs.rows.item(i));
// newsArray[i].statusnet_html=Qt.atob(newsArray[i].statusnet_html);
// newsArray[i].id=newsArray[i].status_id;
// newsArray[i]=fetchUsersForNews(database,user,newsArray[i],allcontacts);
// if (newsArray[i].attachments!==null){newsArray[i].attachments=JSON.parse(Qt.atob(newsArray[i].attachments))};
// callback(newsArray);
// }})}
function chatsfromdb(database,user,callback,stop_time){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
@ -446,25 +453,91 @@ function chatsfromdb(database,user,callback,stop_time){
conversations.push(conversationsrs.rows.item(i).statusnet_conversation_id);
}
var newsArray=[];
var allcontacts=[];
Helperjs.readData(database,"contacts",user,function(obj){allcontacts=obj});
var allcontacts=getAllContacts(database,user);
for(var j = 0; j< conversations.length; j++) {
var newsrs=tx.executeSql('select * from news WHERE username="'+user+'" AND statusnet_conversation_id="'+conversations[j] +'" ORDER BY created_at ASC');
var helpernews=newsrs.rows.item(0);
helpernews.newscount=newsrs.rows.length;
helpernews=fetchUsersForNews(database,user,helpernews,allcontacts);
//var chatArray=[];
// for (var k=0;k<newsrs.rows.length;k++){
// var helperchat=newsrs.rows.item(k);
// helperchat=fetchUsersForNews(database,user,helperchat);
// chatArray.push(helperchat)
//}
//helpernews.chatArray=chatArray;
helpernews.statusnet_html=Qt.atob(helpernews.statusnet_html);
helpernews.text=Qt.atob(helpernews.text);
helpernews.id=helpernews.status_id;
if (helpernews.attachments!==null){helpernews.attachments=JSON.parse(Qt.atob(helpernews.attachments))};
newsArray.push(helpernews);
}
callback(newsArray);
})}
function allchatsfromdb(database,user,callback){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
db.transaction( function(tx) {
// if (!stop_time){var stop="";
// try{var rs = tx.executeSql('select created_at from news WHERE username="'+username+'" ORDER BY created_at DESC LIMIT 1');
// stop="<="+rs.rows.item(0).created_at}catch(e){stop="<99999999999999"}}
// else{var stop="<"+stop_time}
var conversationsrs=tx.executeSql('select DISTINCT statusnet_conversation_id from news WHERE username="'+user+'" ORDER BY created_at DESC'); //+' ORDER BY created_at DESC LIMIT 20');
var conversationIds=[];
for(var i = 0; i < conversationsrs.rows.length; i++) {
conversationIds.push(conversationsrs.rows.item(i).statusnet_conversation_id);
}
var newsArray=[];
var countArray=[];
var allcontacts=getAllContacts(database,user);
for(var j = 0; j< conversationIds.length; j++) {
var newsrs=tx.executeSql('select * from news WHERE username="'+user+'" AND statusnet_conversation_id="'+conversationIds[j] +'" ORDER BY created_at ASC');
var helpernews=newsrs.rows.item(0);
//helpernews.newscount=newsrs.rows.length;
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;
if (helpernews.attachments!==null){helpernews.attachments=JSON.parse(Qt.atob(helpernews.attachments))};
newsArray.push(helpernews);
countArray.push(newsrs.rows.length)
}
var conversationsobject=({});
conversationsobject.conversationIds=conversationIds;
conversationsobject.newsArray=newsArray;
conversationsobject.countArray=countArray;
callback(conversationsobject);
})}
function oldchatfromdb(database,user,conversationId,lastpost,allcontacts,callback){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
db.transaction( function(tx) {
// var newsArray=[];
// var countArray=[];
//var allcontacts=getAllContacts(database,user);
var newsrs=tx.executeSql('select * from news WHERE username="'+user+'" AND statusnet_conversation_id="'+conversationId +'" AND status_id<'+lastpost+' ORDER BY created_at ASC');
if(newsrs.rows.length>0){var helpernews=newsrs.rows.item(0);
var newscount=newsrs.rows.length;
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;
if (helpernews.attachments!==null){helpernews.attachments=JSON.parse(Qt.atob(helpernews.attachments))};
callback(helpernews,newscount);}
// var conversationobject={news:helpernews,newscount:newscount};
// return conversationobject;
})}
function getAllContacts(database,user){
var allcontacts=[];
Helperjs.readData(database,"contacts",user,function(obj){
allcontacts=obj;
for (var n in allcontacts){
allcontacts[n].name=Qt.atob(allcontacts[n].name);
allcontacts[n].description=Qt.atob(allcontacts[n].description)
}
});
return allcontacts;
}
function inArray(list, prop, val) {
if (list.length > 0 ) {
for (var i in list) {if (list[i][prop] == val) {

View File

@ -41,49 +41,50 @@ else{
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 forumname="";try{if (newsitemobject.messagetype==0&&((newsitemobject.friendica_owner)!=(newsitemobject.user.url))){
// if (newsitemobject.messagetype==2){
// newsitemobject.user={};
// newsitemobject.user.profile_image="";
// newsitemobject.user.profile_image_url="";
// newsitemobject.user.name="";
// }
var forumname="";try{if (newsitemobject.messagetype==0&&newsitemobject.hasOwnProperty('friendica_owner')&&((newsitemobject.friendica_owner.url)!=(newsitemobject.user.url))){
//print(newsitemobject.friendica_owner+" Friendica Owner "+JSON.stringify(newsitemobject));
forumname=" via "+Qt.atob(newsitemobject.friendica_owner_object.name)
forumname=" via "+newsitemobject.friendica_owner.name
}}catch(e){print("forum name "+e)}
var likeText="";var dislikeText="";var attendyesText="";var attendnoText="";var attendmaybeText=""; var self={};
try{if (newsitemobject.messagetype==0){
if (newsitemobject.like.length>0){
if (newsitemobject.like.length==1){likeText= Qt.atob(newsitemobject.like[0].name)+" "+ qsTr("likes this.")}
else {likeText= newsitemobject.like.length+" "+ qsTr("like this.")}
try{if (newsitemobject.messagetype==0&&newsitemobject.hasOwnProperty('friendica_activities')){
if (newsitemobject.friendica_activities.like.length>0){
if (newsitemobject.friendica_activities.like.length==1){likeText= newsitemobject.friendica_activities.like[0].name+" "+ qsTr("likes this.")}
else {likeText= newsitemobject.friendica_activities.like.length+" "+ qsTr("like this.")}
}
if (newsitemobject.dislike.length>0){
if (newsitemobject.dislike.length==1){dislikeText= Qt.atob(newsitemobject.dislike[0].name)+" "+ qsTr("doesn't like this.")}
else {dislikeText= newsitemobject.dislike.length+" "+ qsTr("don't like this.")}
if (newsitemobject.friendica_activities.dislike.length>0){
if (newsitemobject.friendica_activities.dislike.length==1){dislikeText= newsitemobject.friendica_activities.dislike[0].name+" "+ qsTr("doesn't like this.")}
else {dislikeText= newsitemobject.friendica_activities.dislike.length+" "+ qsTr("don't like this.")}
}
if (newsitemobject.attendyes.length>0){
if (newsitemobject.attendyes.length==1){attendyesText= Qt.atob(newsitemobject.attendyes[0].name)+" "+ qsTr("will attend.")}
else {attendyesText= newsitemobject.attendyes.length+" "+ qsTr("persons will attend.")}
if (newsitemobject.friendica_activities.attendyes.length>0){
if (newsitemobject.friendica_activities.attendyes.length==1){attendyesText=newsitemobject.friendica_activities.attendyes[0].name+" "+ qsTr("will attend.")}
else {attendyesText= newsitemobject.friendica_activities.attendyes.length+" "+ qsTr("persons will attend.")}
}
if (newsitemobject.attendno.length>0){
if (newsitemobject.attendno.length==1){attendnoText= Qt.atob(newsitemobject.attendno[0].name)+" "+ qsTr("will not attend.")}
else {attendnoText= newsitemobject.attendno.length+" "+ qsTr("persons will not attend.")}
if (newsitemobject.friendica_activities.attendno.length>0){
if (newsitemobject.friendica_activities.attendno.length==1){attendnoText= newsitemobject.friendica_activities.attendno[0].name+" "+ qsTr("will not attend.")}
else {attendnoText= newsitemobject.friendica_activities.attendno.length+" "+ qsTr("persons will not attend.")}
}
if (newsitemobject.attendmaybe.length>0){
if (newsitemobject.attendmaybe.length==1){attendmaybeText= Qt.atob(newsitemobject.attendmaybe[0].name)+" "+ qsTr("may attend.")}
else {attendmaybeText= newsitemobject.attendmaybe.length+" "+ qsTr("persons may attend.")}
if (newsitemobject.friendica_activities.attendmaybe.length>0){
if (newsitemobject.friendica_activities.attendmaybe.length==1){attendmaybeText= newsitemobject.friendica_activities.attendmaybe[0].name+" "+ qsTr("may attend.")}
else {attendmaybeText= newsitemobject.friendica_activities.attendmaybe.length+" "+ qsTr("persons may attend.")}
}
//var friendica_activities_self=JSON.parse(newsitemobject.friendica_activities_self);
if (newsitemobject.hasOwnProperty("friendica_activities_self")){
if (newsitemobject.friendica_activities_self.indexOf(3)!=-1){self.attending=qsTr("yes")}
if (newsitemobject.friendica_activities_self.indexOf(4)!=-1){self.attending=qsTr("no")}
if (newsitemobject.friendica_activities_self.indexOf(5)!=-1){self.attending=qsTr("maybe")}
if (newsitemobject.friendica_activities_self.indexOf(1)!=-1){self.liked=1}
if (newsitemobject.friendica_activities_self.indexOf(2)!=-1){self.disliked=1}
}} catch(e){print("Activities "+e)}
}}} catch(e){print("Activities "+e+ " "+JSON.stringify(newsitemobject.friendica_activities))}
var friendica_activities={likeText:likeText,dislikeText:dislikeText,attendyesText:attendyesText,attendnoText:attendnoText,attendmaybeText:attendmaybeText,self:self}
var attachmentList=[];try{if(newsitemobject.attachments){
var attachArray=JSON.parse(Qt.atob(newsitemobject.attachments));
var attachArray=newsitemobject.attachments;
for (var image in attachArray){if(attachArray[image].mimetype=="image/gif"){
attachmentList.push(attachArray[image])
}

View File

@ -1,5 +1,4 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
// This file is part of Friendiqa // https://github.com/lubuwest/Friendiqa
// Copyright (C) 2017 Marco R. <thomasschmidt45@gmx.net>
//
// This program is free software: you can redistribute it and/or modify
@ -338,50 +337,6 @@ function cleanContacts(login,database,callback){
})
}
function processNews(callback){
if (contactLoadType=="news"){
if(root.news.length==0){}
else{// show news
Newsjs.storeNews(login,db,news,root,function(dbnews){
if(login.newsViewType=="Timeline"){
Newsjs.newsfromdb(db,login.username,function(dbnews){
root.newsSignal(dbnews);
newstab.newstabstatus=login.newsViewType})
}
else{
Newsjs.chatsfromdb(db,login.username,function(dbnews){
root.newsSignal(dbnews);
newstab.newstabstatus=login.newsViewType})
}
})
}
}
else if (contactLoadType=="friends"){// show friends
root.friendsSignal(login.username);
Newsjs.getCurrentContacts(login,db,function(contacts){
contactlist=contacts;
})}
else if (contactLoadType=="conversation"){
var conversationid=news[0].statusnet_conversation_id
if (!isNaN(parseInt(conversationid))){//no directmessage conversation
Newsjs.storeNews(root.login,root.db,news,root,function(){
Newsjs.conversationfromdb(db,root.login.username,conversationid, function(newsarray){
newstab.conversation=newsarray;
})
})}
else {newstab.conversation=news}//only DM conversations from database
}
else if (contactLoadType=="favorites"){//show favorited news
Newsjs.storeNews(root.login,root.db,news,root,function(){
Newsjs.favoritesfromdb(db,login.username,function(newsarray){
root.newsSignal(newsarray);
newstab.newstabstatus="Favorites";
})
})}
callback()
}
function updateContactInDB(login,database,isFriend,contact){// for newstab and friendstab
var currentTime=Date.now();
var image_timestamp=0;
@ -393,8 +348,217 @@ function updateContactInDB(login,database,isFriend,contact){// for newstab and f
var result;
result = tx.executeSql('SELECT * from contacts where username="'+login.username+'" AND url = "'+contact.url+'"'); // check for news url
if(result.rows.length === 1) {// use update
result = tx.executeSql('UPDATE contacts SET id='+contact.id+', name="'+Qt.btoa(contact.name)+'", screen_name="'+contact.screen_name+'", location="'+contact.location+'",imageAge='+currentTime+', profile_image_url="'+contact.profile_image_url+'", description="'+Qt.btoa(contact.description)+'", protected="'+contact.protected+'", followers_count='+contact.followers_count+', friends_count='+contact.friends_count+', created_at="'+ Date.parse(Newsjs.cleanDate(contact.created_at))+'", favourites_count="'+contact.favorites_count+'", utc_offset="'+contact.utc_offset+'", time_zone="'+contact.time_zone+'", statuses_count='+contact.statuses_count+', following="'+contact.following+'", verified ="'+contact.verified+'", statusnet_blocking="'+contact.statusnet_blocking+'", notifications="'+contact.notifictions+'", statusnet_profile_url="'+contact.statusnet_profile_url+'", cid='+contact.cid+', network="'+contact.network+'", isFriend='+isFriend+', timestamp='+ currentTime+' where username="'+login.username+'" AND url="'+contact.url+'"');
result = tx.executeSql('UPDATE contacts SET id='+contact.id+', name="'+Qt.btoa(contact.name)+'", screen_name="'+contact.screen_name+'", location="'+contact.location+'",imageAge='+currentTime+', profile_image_url="'+contact.profile_image_url+'", description="'+Qt.btoa(contact.description)+'", protected="'+contact.protected+'", followers_count='+contact.followers_count+', friends_count='+contact.friends_count+', created_at="'+ contact.created_at+'", favourites_count="'+contact.favorites_count+'", utc_offset="'+contact.utc_offset+'", time_zone="'+contact.time_zone+'", statuses_count='+contact.statuses_count+', following="'+contact.following+'", verified ="'+contact.verified+'", statusnet_blocking="'+contact.statusnet_blocking+'", notifications="'+contact.notifictions+'", statusnet_profile_url="'+contact.statusnet_profile_url+'", cid='+contact.cid+', network="'+contact.network+'", isFriend='+isFriend+', timestamp='+ currentTime+' where username="'+login.username+'" AND url="'+contact.url+'"');
} else {// use insert
result = tx.executeSql('INSERT INTO contacts VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)', [login.username,contact.id,Qt.btoa(contact.name),contact.screen_name,contact.location,currentTime,contact.profile_image_url, Qt.btoa(contact.description),"",contact.url,contact.protected,contact.followers_count, contact.friends_count,Date.parse(Newsjs.cleanDate(contact.created_at)),contact.favorites_count,contact.utc_offset,contact.time_zone,contact.statuses_count,contact.following,contact.verfied,contact.statusnet_blocking,contact.notifications,contact.statusnet_profile_url,contact.cid,contact.network,isFriend,image_timestamp]);}
result = tx.executeSql('INSERT INTO contacts VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)', [login.username,contact.id,Qt.btoa(contact.name),contact.screen_name,contact.location,currentTime,contact.profile_image_url, Qt.btoa(contact.description),"",contact.url,contact.protected,contact.followers_count, contact.friends_count,contact.created_at,contact.favorites_count,contact.utc_offset,contact.time_zone,contact.statuses_count,contact.following,contact.verfied,contact.statusnet_blocking,contact.notifications,contact.statusnet_profile_url,contact.cid,contact.network,isFriend,image_timestamp]);}
});
}
function processNews(api,data){
try{var newslist=JSON.parse(data);
} catch(e){
Helperjs.showMessage(qsTr("Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root)};
if (typeof(newslist)=='undefined'){
Helperjs.showMessage(qsTr("Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root)
}
else if (newslist.hasOwnProperty('status')){
Helperjs.showMessage(qsTr("Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root)
} else if (!(Array.isArray(newslist))){
replytimer.restart()
} else {
var allcontacts=[];
allcontacts=Newsjs.getAllContacts(db,login.username);
if (api=="/api/direct_messages/all"){
for (var n in newslist){
newslist[n].created_at=Date.parse(Newsjs.cleanDate(newslist[n].created_at));
newslist[n].messagetype=1;
newslist[n].source=" Friendica";
newslist[n].status_id=newslist[n].id;
newslist[n].uid=newslist[n].sender.id;
newslist[n].statusnet_conversation_id=newslist[n].friendica_parent_uri;
newslist[n].user=cleanUser(newslist[n].sender);
newslist[n].statusnet_html=newslist[n].text;
}}
else if (api=="/api/friendica/notifications"){
for (var n in newslist){
newslist[n].created_at=Date.parse(newslist[n].date);
newslist[n].messagetype=2;
newslist[n].user=Newsjs.objFromArray(allcontacts,"url",newslist[n].url)
if (newslist[n].user==false){
newslist[n].user={"profile_image_url": newslist[n].photo,"name": newslist[n].name," url":newslist[n].url, "created_at":newslist[n].date};
newslist[n].user=cleanUser(newslist[n].user);
}
newslist[n].statusnet_html=newslist[n].msg_html;
}
} else {
var chatlist=[];
var conversationIds=[];
var commentCount=[];
for (var n in newslist){
newslist[n].created_at=Date.parse(Newsjs.cleanDate(newslist[n].created_at));
newslist[n].messagetype=0;
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]);
}
for (var o in newslist[n].friendica_activities.dislike){
newslist[n].friendica_activities.dislike[o]=cleanUser(newslist[n].friendica_activities.dislike[o]);
}
for (var p in newslist[n].friendica_activities.attendyes){
newslist[n].friendica_activities.attendyes[p]=cleanUser(newslist[n].friendica_activities.attendyes[p]);
}
for (var q in newslist[n].friendica_activities.attendno){
newslist[n].friendica_activities.attendno[q]=cleanUser(newslist[n].friendica_activities.attendno[q]);
}
for (var r in newslist[n].friendica_activities.attendmaybe){
newslist[n].friendica_activities.attendmaybe[r]=cleanUser(newslist[n].friendica_activities.attendmaybe[r]);
}
}
if(!(newslist[n].hasOwnProperty('friendica_owner'))){
newslist[n].friendica_owner=newslist[n].user
}
var conversationindex=conversationIds.indexOf(newslist[n].statusnet_conversation_id);
//fill chatlist
if (conversationindex==-1){
chatlist.push(newslist[n]);
conversationIds.push(newslist[n].statusnet_conversation_id);
commentCount.push(1);
} else{
commentCount[conversationindex]=commentCount[conversationindex]+1;
chatlist[conversationindex]=newslist[n];
}
}
//enrich chatlist with old entries
for (var count in chatlist){ //print("chat "+JSON.stringify(chatlist[count])+" count: "+commentCount[count])
//chatlist[count].newscount=commentCount[count]
if (chatlist[count].id_str!==chatlist[count].statusnet_conversation_id){
try{
Newsjs.oldchatfromdb(db,login.username,chatlist[count].statusnet_conversation_id,chatlist[count].id,allcontacts,function(oldpost,oldcount){
chatlist[count]=oldpost;
chatlist[count].newscount=oldcount+commentCount[count];
//print("JSON "+chatlist[count].statusnet_conversation_id+" "+chatlist[count].id+JSON.stringify(oldpost))
})
}catch(e){print(e)}
}
else{chatlist[count].newscount=commentCount[count]}
}
}
if (api=="/api/conversation/show"){
newslist.reverse();
newstab.conversation=newslist
}
else if (newstab.newstabstatus==="Conversations"){
showNews(chatlist);root.news=newslist}
else {showNews(newslist);root.news=newslist};
var newstabarray=["Conversations","Favorites","Timeline","DirectMessage"];
if (newstabarray.indexOf(newstab.newstabstatus)>-1){contacttimer.start()}
}
}
function cleanUser(user){
user.created_at=Date.parse(Newsjs.cleanDate(user.created_at));
var imagehelper1=user.profile_image_url.split("?");
var imagehelper2=imagehelper1[0].substring(imagehelper1[0].lastIndexOf("/")+1,imagehelper1[0].length);
var imagehelper3=login.imagestore+"contacts/"+user.screen_name+"-"+imagehelper2
if(filesystem.fileexist(imagehelper3)){user.profile_image=imagehelper3}else {user.profile_image=""}
return user
}
function updateView(viewtype){
newsBusy.running=true;
//downloadNotice.text="xhr start "+Date.now()
switch(viewtype){
case "Conversations":
var lastnews=Newsjs.getLastNews(login,db);
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/statuses/friends_timeline");
xhr.clearParams();
xhr.setParam("since_id",lastnews);
xhr.setParam("count",50)
break;
case "Timeline":
var lastnews=Newsjs.getLastNews(login,db);
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/statuses/friends_timeline");
xhr.clearParams();
xhr.setParam("since_id",lastnews);
xhr.setParam("count",50)
break;
case "Search":
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/search");
break;
case "Notifications":
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/friendica/notifications");
xhr.clearParams();
break;
case "Direct Messages":
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/direct_messages/all");
xhr.clearParams();
break;
case "Public Timeline":
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/statuses/public_timeline");
xhr.clearParams();
break;
case "Favorites":
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/favorites");
xhr.clearParams();
break;
default:
var lastnews=Newsjs.getLastNews(login,db);
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/statuses/friends_timeline");
xhr.clearParams();
xhr.setParam("since_id",lastnews);
xhr.setParam("count",50)
newstab.newstabstatus="Conversations";
}
xhr.get();
if (viewtype==="Conversations"){Newsjs.allchatsfromdb(db,login.username,function(temp){
newsStack.allchats=temp
})}
}
function showGroups(){
Helperjs.readData(db,"groups",login.username,function(groups){
var groupitems="";
for (var i=0;i<groups.length;i++){
groupitems=groupitems+"MenuItem{text:'"+groups[i].groupname+"'; onTriggered: Service.getGroupnews("+groups[i].gid+")}"
}
var menuString="import QtQuick.Controls 1.4; import 'qrc:/js/service.js' as Service; Menu {"+groupitems+"}";
var grouplistObject=Qt.createQmlObject(menuString,newsStack,"groupmenuOutput");
grouplistObject.popup()
})
}
function getGroupnews(list){
newstab.newstabstatus="Group news";
newsBusy.running=true;
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/lists/statuses");
xhr.clearParams();
xhr.setParam("list_id",list)
xhr.get();
}

View File

@ -43,7 +43,7 @@ Rectangle{
textFormat: Text.RichText
width: parent.width
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
text: "<b>Friendiqa v0.2 </b><br>Licensed under GPL 3 with the exception of OpenSSL <br> "+
text: "<b>Friendiqa v0.3 </b><br>Licensed under GPL 3 with the exception of OpenSSL <br> "+
"Profile <a href='https://freunde.ma-nic.de/profile/friendiqa'>https://freunde.ma-nic.de/profile/friendiqa</a><br>"+
"Sourcecode: <a href='https://github.com/LubuWest/Friendiqa'>https://github.com/LubuWest/Friendiqa</a><br>"+
"C++ code by <a href='https://kirgroup.com/profile/fabrixxm'>Fabio</a><br>"+

View File

@ -37,7 +37,7 @@ Item {
id: contactLargeComponent
x:mm
y:mm
property var contact:{}
property var contact:({})
property var createdAtDate: new Date(contact.created_at)
property string connectUrl: (contact.network!=="dfrn")||(contact.isFriend!=0)?"":( "<a href='"+contact.url.replace("profile","dfrn_request") +"'>"+qsTr("Connect")+"</a><br>")
@ -63,7 +63,7 @@ Rectangle {
x: mm
width: root.width-6*mm //friendsTabView.width-4*mm
height: 3*mm
text:Qt.atob(contact.name)+" (@"+contact.screen_name+")"
text:contact.name+" (@"+contact.screen_name+")"
elide:Text.ElideRight
anchors.topMargin: 0
anchors.left: photoImage.left
@ -91,7 +91,7 @@ Rectangle{
font.pixelSize: 3*mm
textFormat:Text.RichText
wrapMode: Text.Wrap
text:"<b>"+qsTr("Description")+": </b> "+Qt.atob(contact.description)+"<br> <b>"+qsTr("Location")+":</b> "+contact.location+"<br> <b>"+qsTr("Posts")+":</b> "+contact.statuses_count+
text:"<b>"+qsTr("Description")+": </b> "+contact.description+"<br> <b>"+qsTr("Location")+":</b> "+contact.location+"<br> <b>"+qsTr("Posts")+":</b> "+contact.statuses_count+
"<br> <b>"+qsTr("URL")+":</b> <a href='"+ contact.url+"'>"+contact.url+"</a><br>"+
connectUrl+ "<b>"+qsTr("Created at")+":</b> "+createdAtDate.toLocaleString(Qt.locale())
onLinkActivated: {
@ -123,7 +123,7 @@ Rectangle{
text: "\uf0e6" //"Messages"
onClicked:{
root.currentIndex=0;
newstab.active=true;
//newstab.active=true;
root.messageSignal(contact) ;
contactLargeComponent.destroy();
}
@ -135,7 +135,7 @@ Rectangle{
text: "\uf040" //"DM"
onClicked:{
root.currentIndex=0;
newstab.active=true;
//newstab.active=true;
root.directmessageSignal(contact.screen_name);
contactLargeComponent.destroy();
}

View File

@ -126,6 +126,8 @@ Rectangle {
try {friendsModel.clear()} catch(e){print(e)};
Helperjs.readData(root.db,"contacts",login.username,function(friendsobject){
for (var i=0;i<friendsobject.length;i++){
friendsobject[i].description=Qt.atob(friendsobject[i].description);
friendsobject[i].name=Qt.atob(friendsobject[i].name);
if(Helperjs.getCount(db,login,"contacts","screen_name",friendsobject[i].screen_name)>1){
friendsobject[i].screen_name=friendsobject[i].screen_name+"+"+friendsobject[i].cid
}
@ -205,6 +207,8 @@ Rectangle {
try {contactsModel.clear()} catch(e){print(e)};
Helperjs.readData(db, "contacts",root.login.username,function(contactsobject){
for (var j=0;j<contactsobject.length;j++){
contactsobject[j].description=Qt.atob(contactsobject[j].description);
contactsobject[j].name=Qt.atob(contactsobject[j].name);
contactsModel.append({"contact":contactsobject[j]});
}
},"isFriend",0,"screen_name ASC");
@ -220,6 +224,8 @@ Rectangle {
try {contactsModel.clear()} catch(e){print(e)};
Helperjs.readData(db, "contacts",root.login.username,function(contactsobject){
for (var j=0;j<contactsobject.length;j++){
contactsobject[j].description=Qt.atob(contactsobject[j].description);
contactsobject[j].name=Qt.atob(contactsobject[j].name);
contactsModel.append({"contact":contactsobject[j]});
}
},"isFriend",0,"screen_name ASC");

View File

@ -88,16 +88,16 @@ TabView{
xhr.setContactlist(contactnames);
xhr.setImagedir(login.imagestore);
xhr.getlist();
Service.processNews(function(){
root.contactLoadType="";
root.news=[];
})
// Service.processNews(function(){
// root.contactLoadType="";
// root.news=[];
// })
}
else if (contactLoadType!=""){
Service.processNews(function(){
root.contactLoadType="";
root.news=[];
})}
// else if (contactLoadType!=""){
// Service.processNews(function(){
// root.contactLoadType="";
// root.news=[];
// })}
}
Connections{
@ -146,7 +146,7 @@ TabView{
frameOverlap: 1
tab: Rectangle {
color: styleData.selected?"sky blue":"light blue"
border.color: "light grey"
//border.color: "light grey"
implicitWidth: root.width/5
implicitHeight: 5*mm
Text { id: text
@ -192,11 +192,9 @@ TabView{
id: configtab
source: (root.currentIndex==4)?"qrc:/qml/configqml/ConfigTab.qml":""
}
// Component.onCompleted: {
// var imagePicker = Qt.createQmlObject('import QtQuick 2.0; import "qrc:/qml/genericqml";'+
// osSettings.imagePickQml+'{multiple : true; onReady: {'+
// 'if(imageUrls.length==1){root.currentIndex=0;newstab.active=true;root.uploadSignal(imageUrls)} else{'+
// ' root.currentIndex=2;fotostab.active=true;'+
// 'root.uploadSignal(imageUrls)};}}',root,"imagePicker");
// }
Component.onCompleted: {
if(osSettings.imagePickQml=="ImagePicker"){var component = Qt.createComponent("qrc:/qml/genericqml/IntentReceiver.qml");
var IntentReceiverQml = component.createObject(root)
}
}
}

View File

@ -34,10 +34,10 @@ Rectangle{
id: blueButton
width: Math.max(mainText.width+2*mm,8*mm)
height: 5*mm
color:"light blue"
color:"light blue"//"#EFEAEA" "sky blue"
property alias fontColor: mainText.color
border.color:"grey"
border.width:1
// border.color:"grey"
// border.width:1
radius: mm
property alias text: mainText.text
signal clicked

View File

@ -0,0 +1,83 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
// Copyright (C) 2017 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
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// In addition, as a special exception, the copyright holders give
// permission to link the code of portions of this program with the
// OpenSSL library under certain conditions as described in each
// individual source file, and distribute linked combinations including
// the two.
//
// You must obey the GNU General Public License in all respects for all
// of the code used other than OpenSSL. If you modify file(s) with this
// exception, you may extend this exception to your version of the
// file(s), but you are not obligated to do so. If you do not wish to do
// so, delete this exception statement from your version. If you delete
// this exception statement from all source files in the program, then
// also delete it here.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.7
import QtQuick.Controls 1.2
import "qrc:/qml/genericqml"
import "qrc:/js/news.js" as Newsjs
import "qrc:/js/helper.js" as Helperjs
import "qrc:/js/service.js" as Service
Item {
id:searchComponent
onVisibleChanged: if (visible) searchText.forceActiveFocus()
// border.color: "#EEEEEE"
// border.width: 1
// color:"lightgrey"
// width:conversationView.width
// height:Math.max(replyText.contentHeight+2*mm,6*mm)
Rectangle{
color: "white"
radius:0.5*mm
anchors.left: parent.left
anchors.leftMargin:mm
anchors.top:parent.top
anchors.topMargin: 0.5*mm
width:parent.width-2*mm
height:Math.max( searchText.contentHeight,5*mm)
TextInput {
id: searchText
font.pixelSize: 3*mm
wrapMode: Text.Wrap
anchors.fill: parent
selectByMouse: true
cursorVisible: false
onEditingFinished: search(displayText)
//onHeightChanged: newsView.contentY+=4.5*mm
}
// BlueButton {
// id: sendButton
// text: "\uf002"
// anchors.left: parent.right
// anchors.leftMargin:mm
// anchors.top:parent.top
// //anchors.topMargin: 0.5*mm
// color:"white"
// onClicked: {
// var body=searchText.getText(0,searchText.length);
// search(body)
// }
// }
}
}

View File

@ -126,14 +126,19 @@ Rectangle {
xhr.clearParams();
xhr.setLogin(login.username+":"+Qt.atob(login.password));
if (conversationModel.get(0).newsitemobject.messagetype==0){
//xhr.url= login.server + "/api/statuses/update.json";
xhr.setUrl(login.server);
xhr.setApi("/api/statuses/update");
xhr.setParam("source", "Friendiqa");
xhr.url= login.server + "/api/statuses/update.json";
xhr.setParam("status", body);
xhr.setParam("in_reply_to_status_id", conversationModel.get(conversationModel.count-1).newsitemobject.status_id)}
else {xhr.url= login.server + "/api/direct_messages/new.json";
xhr.setParam("in_reply_to_status_id", conversationModel.get(conversationModel.count-1).newsitemobject.id)}
else {//xhr.url= login.server + "/api/direct_messages/new.json";
xhr.setUrl(login.server);
xhr.setApi("/api/direct_messages/new");
xhr.setParam("text", body);
xhr.setParam("screen_name",conversationModel.get(conversationModel.count-1).newsitemobject.screen_name);
xhr.setParam("replyto", conversationModel.get(conversationModel.count-1).newsitemobject.status_id)
xhr.setParam("replyto", conversationModel.get(conversationModel.count-1).newsitemobject.id)
}
xhr.post();
} catch(e){Helperjs.showMessage("Error",e.toString(),root)}

View File

@ -77,7 +77,7 @@ Rectangle {
font.pixelSize: 3*mm
anchors.left: contactImage.right
anchors.margins: 1*mm
text:Qt.atob(contact.name)
text:contact.name
}
MouseArea{

View File

@ -0,0 +1,51 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
// Copyright (C) 2017 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
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// In addition, as a special exception, the copyright holders give
// permission to link the code of portions of this program with the
// OpenSSL library under certain conditions as described in each
// individual source file, and distribute linked combinations including
// the two.
//
// You must obey the GNU General Public License in all respects for all
// of the code used other than OpenSSL. If you modify file(s) with this
// exception, you may extend this exception to your version of the
// file(s), but you are not obligated to do so. If you do not wish to do
// so, delete this exception statement from your version. If you delete
// this exception statement from all source files in the program, then
// also delete it here.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.0
Rectangle {
id:hasgtagRectangle
color: "light grey"
property alias text: hashtagText.text
radius:0.3*mm
width:hashtagText.contentWidth+mm
height:2.5* mm
Text{
id:hashtagText
font.pixelSize: 1.5*mm
anchors.centerIn: parent
anchors.margins: 0.5*mm
}
MouseArea{
anchors.fill: parent
onClicked:{search(hashtagText.text.replace("#",""))}
}
}

View File

@ -39,12 +39,11 @@ import "qrc:/js/smiley.js" as Smileyjs
import "qrc:/qml/genericqml"
Flickable{
Rectangle{
color:"white"
width:root.width-5*mm
height:root.height-12*mm
contentHeight: messageColumn.height
boundsBehavior: Flickable.StopAtBounds
id:messageSend
//anchors.fill: parent
property string parentId: ""
property string reply_to_user:""
property alias bodyMessage: bodyField.text
@ -57,15 +56,17 @@ Flickable{
property var group_allow:login.permissions[2]
property var group_deny:login.permissions[3]
function attachImage(url){
function attachImage(url){ print("attachImage "+url)
var imageAttachmentObject=Qt.createQmlObject('import QtQuick 2.0; Image {id:imageAttachment'+attachImageURLs.length+'; source:"'+
url.toString()+'"; x:2*mm; width: 45*mm; height: 45*mm;fillMode: Image.PreserveAspectFit;MouseArea{anchors.fill:parent;onClicked:{attachImageURLs.splice(attachImageURLs.indexOf("'+
url+'"),1); imageAttachment'+attachImageURLs.length+'.destroy()}}}',messageColumn,"attachedImage");
}
function statusUpdate(title,status,in_reply_to_status_id,attachImageURL) {
xhr.url= login.server + "/api/statuses/update.json";
//xhr.url= login.server + "/api/statuses/update.json";
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/statuses/update");
xhr.clearParams();
xhr.setParam("source", "Friendiqa");
xhr.setParam("status", status);
@ -80,17 +81,27 @@ Flickable{
}
function dmUpdate(title,text,replyto,screen_name,attachImageURL) {
xhr.url= login.server + "/api/direct_messages/new.json";
//xhr.url= login.server + "/api/direct_messages/new.json";
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/direct_messages/new");
xhr.clearParams();
xhr.setParam("text", text);
xhr.setParam("screen_name", screen_name);
if (parentId!="") {xhr.setParam("replyto", replyto)};
if (title!=="") {xhr.setParam("title", title)};
//if (title!=="") {xhr.setParam("title", title)};
xhr.post();
}
Column {
Flickable{
anchors.fill: parent
contentHeight: messageColumn.height
boundsBehavior: Flickable.StopAtBounds
id:messageSend
Column {
id:messageColumn
spacing: 0.5*mm
width: parent.width
@ -98,7 +109,7 @@ Flickable{
id: titleField
width: parent.width
placeholderText: qsTr("Title (optional)")
visible: messageSend.parentId === ""
visible: parentId === ""
}
Rectangle{
@ -236,3 +247,4 @@ Flickable{
}
Component.onCompleted: if(attachImageURLs.length>0){attachImage(attachImageURLs[0])}
}
}

View File

@ -31,64 +31,98 @@
import QtQuick 2.0
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.4
import QtQuick.Dialogs 1.3
import "qrc:/qml/genericqml"
import "qrc:/js/news.js" as Newsjs
import "qrc:/js/helper.js" as Helperjs
import "qrc:/js/service.js" as Service
//import AndroidNative 1.0
Item {
Connections{
target:newstab
onNewstabstatusChanged:{
newstabstatusButton.text= qsTr(newstab.newstabstatus)
// switch(newstab.newstabstatus){
// case "Timeline": newstabstatusCombo.currentIndex=1; break;
// case "Conversations":newstabstatusCombo.currentIndex=2; break;
// case "Favorites":newstabstatusCombo.currentIndex=3; break;
// case "Network":newstabstatusCombo.currentIndex=4; break;
// case "Direct Messages":newstabstatusCombo.currentIndex=5; break;
// case "Notifications":newstabstatusCombo.currentIndex=6; break;
// case "Search":newstabstatusCombo.currentIndex=7; break;
// case "Groupnews":newstabstatusCombo.currentIndex=8; break;
// }
}
}
Connections{
target:xhr
// onError:{if (data=="contact"){downloadNotice.text=root.newContacts[root.currentContact].name+"... Error!"}}
onSuccess:{replytimer.start() //wait 1 second to load new timeline
onError:{
Helperjs.showMessage(qsTr("Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root);
}
onSuccess:{
// downloadNotice.text=downloadNotice.text+ "\n xhr finished "+Date.now();
Service.processNews(api,data);
}
}
Timer {id:replytimer; interval: 1000; running: false; repeat: false
onTriggered: {
if(newstab.newstabstatus=="Conversation"){
showConversation(newsStack.timelineIndex-1,newsModel.get(0).newsitemobject)}
else{
var onlynew=true;
Newsjs.getFriendsTimeline(login,db,contactlist,onlynew,newstab,function(rns,rnc){
Service.updateView(newstab.newstabstatus)
root.contactLoadType="news";
root.news=rns;root.newContacts=rnc;})
}
}
}
Timer {id:contacttimer; interval: 50; running: false; repeat: false
onTriggered: {
// downloadNotice.text=downloadNotice.text + "\n contactTimer start "+ Date.now()
root.newContacts=Newsjs.findNewContacts(root.news,root.contactlist);
Newsjs.storeNews(login,db,root.news,root)
}
}
function showNews(newsToShow){
try{if (newsStack.depth>1){newsStack.pop()}}catch(e){}
newsBusy.running=false;
var currentTime= new Date();
downloadNotice.text="";
var msg = {'currentTime': currentTime, 'model': newsModel,'news':newsToShow};
// downloadNotice.text=downloadNotice.text + "\n shownews start "+ Date.now();
//print("appendnews "+newsStack.appendNews +JSON.stringify(newsToShow))
var msg = {'currentTime': currentTime, 'model': newsModel,'news':newsToShow,'appendnews':newsStack.appendNews};
newsWorker.sendMessage(msg);
newsStack.appendNews=false
}
function showConversation(conversationIndex,newsitemobject){
//newsBusy.running=true;
root.contactLoadType="conversation";
newsStack.conversationIndex= conversationIndex;
//print(newsitemobject.id);
if(newsitemobject.messagetype==0){
Newsjs.requestConversation(root.login,db,newsitemobject.status_id,root.contactlist,root,function(ns,nc){
root.news=ns;root.newContacts=nc;
})}
else{Newsjs.conversationfromdb(root.db,root.login.username,newsitemobject.statusnet_conversation_id, function(newsarray){
root.news=newsarray;root.newContacts=[];
})}
xhr.clearParams();
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/conversation/show");
xhr.setParam("id",newsitemobject.id)
xhr.get();
}
else{
xhr.clearParams();
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/direct_messages/conversation");
xhr.setParam("uri",newsitemobject.statusnet_conversation_id)
xhr.get();
}
}
function showContact(contact){
@ -98,6 +132,21 @@ Item {
}
}
function search(term){//print("Search "+term)
if (term!=""){
newstab.newstabstatus="Search";
newsBusy.running=true;
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
xhr.setApi("/api/search");
xhr.clearParams();
xhr.setParam("q",term)
xhr.get();}
newsSearch.visible=false;
newsView.anchors.topMargin=7*mm
}
function onFriendsMessages(friend){
newstab.newstabstatus="Contact"
Newsjs.newsfromdb(db,root.login.username, function(dbnews){
@ -132,18 +181,163 @@ Item {
id: newsStack
anchors.fill:parent
property int conversationIndex: 0
property bool appendNews: false
property var allchats: ({})
initialItem:Rectangle {
id:newslistRectangle
y:1
color: "white"
// ComboBox{
// id:newstabstatusCombo
// anchors.top: parent.top
// anchors.topMargin: 0.5*mm
// width: 1/3*root.width
// height: 5*mm;
// style:
// ComboBoxStyle{
// background: Rectangle {
// color:"light blue"
// radius: 0.5*mm
// }
// label: Text {
// verticalAlignment: Text.AlignVCenter
// horizontalAlignment: Text.AlignHCenter
// text: control.currentText
// }
// }
// model: ListModel {
// id: newscomboItems
// ListElement { type: "Timeline"; text: qsTr("Timeline")}
// ListElement { type: "Conversations";text: qsTr("Conversations")}
// ListElement { type: "Favorites";text: qsTr("Favorites") }
// ListElement { type: "PublicTimeline";text: qsTr("Public timeline") }
// ListElement { type: "DirectMessages";text: qsTr("Direct Messages") }
// ListElement { type: "Notifications";text: qsTr("Notifications") }
// ListElement { type: "Search";text: qsTr("Search") }
// ListElement { type: "Groupnews"; text: qsTr("Group News") }
// ListElement { type: "Quit";text: qsTr("Quit") }
// }
// currentIndex:(login.newsViewType=="Timeline")?0:1
// onCurrentIndexChanged:{
// //onActivated:{
// print(newscomboItems.get(currentIndex).type);
// switch(newscomboItems.get(currentIndex).type){
// case "Timeline":
// newstab.newstabstatus="Timeline";
// newsModel.clear();
// try{ Newsjs.newsfromdb(root.db,root.login.username, function(dbnews){
// showNews(dbnews)
// })}catch(e){Helperjs.showMessage("Error",e,root)}
// break;
// case "Conversations":
// newsModel.clear();
// newstab.newstabstatus="Conversations";
// Newsjs.chatsfromdb(db,root.login.username,function(news){showNews(news)})
// break;
// case "Favorites":
// newstab.newstabstatus="Favorites";
// root.contactLoadType="favorites";
// Service.updateView("Favorites");
// break;
// case "PublicTimeline":
// newstab.newstabstatus="Network";
// Service.updateView("Network");
// break;
// case "DirectMessages":
// newstab.newstabstatus="DirectMessages";
// Service.updateView("DirectMessages");
// break;
// case "Notifications":
// newstab.newstabstatus="Notifications";
// Service.updateView("Notifications");
// break;
// case "Search":
// newsView.anchors.topMargin=18*mm;
// newsSearch.visible=true
// break;
// case "Groupnews":
// Service.showGroups();
// break;
// case "Quit":
// Service.cleanNews(root.db,function(){
// Service.cleanContacts(root.login,root.db,function(){
// Qt.quit()})
// })
// }
// }
// }
BlueButton{
id:newstabstatusButton
anchors.top: parent.top
anchors.topMargin: 0.5*mm
text: qsTr(newstab.newstabstatus)
onClicked: {newstabmenu.popup()}
Menu{id:newstabmenu
MenuItem {
text: qsTr("Timeline")
onTriggered: {
newstab.newstabstatus="Timeline";
newsModel.clear();
try{ Newsjs.newsfromdb(root.db,root.login.username, function(dbnews){
showNews(dbnews)
})}catch(e){Helperjs.showMessage("Error",e,root)}}
}
MenuItem {
text: qsTr("Conversations")
onTriggered:{
newsModel.clear();
newstab.newstabstatus="Conversations";
Newsjs.chatsfromdb(db,root.login.username,function(news){showNews(news)})
}
}
MenuItem {
text: qsTr("Favorites")
onTriggered:{
newstab.newstabstatus="Favorites";
// root.contactLoadType="favorites";
Service.updateView("Favorites")
}
}
MenuItem {
text: qsTr("Public timeline")
onTriggered:{
newstab.newstabstatus="Public Timeline";
Service.updateView("Public Timeline")
}
}
MenuItem {
text: qsTr("Direct Messages")
onTriggered:{
newstab.newstabstatus="Direct Messages";
Service.updateView("Direct Messages")
}
}
MenuItem {
text: qsTr("Notifications")
onTriggered:{
newstab.newstabstatus="Notifications";
Service.updateView("Notifications")
}
}
MenuItem {
text: qsTr("Group news")
onTriggered:Service.showGroups();
}
MenuItem {
text: qsTr("Quit")
onTriggered:{
Service.cleanNews(root.db,function(){
Service.cleanContacts(root.login,root.db,function(){
Qt.quit()})
})
}
}
}
}
Row{
@ -152,6 +346,20 @@ Item {
anchors.topMargin: 0.5*mm
anchors.right: parent.right
BlueButton {
id: searchButton
text: "\uf002"
onClicked: {
if (newsSearch.visible==false){
newsView.anchors.topMargin=18*mm;
newsSearch.visible=true}
else{
newsSearch.visible=false;
newsView.anchors.topMargin=7*mm;
}
}
}
BlueButton {
id: newMessageButton
text: "\uf040"
@ -166,32 +374,20 @@ Item {
},"isFriend",1);
}
}
BlueButton {
id: quitButton
text: "\uf08b"
onClicked: {Service.cleanNews(root.db,function(){
Service.cleanContacts(root.login,root.db,function(){
Qt.quit() })
})}
}
// BlueButton {
// id: quitButton
// text: "\uf08b"
// onClicked: {Service.cleanNews(root.db,function(){
// Service.cleanContacts(root.login,root.db,function(){
// Qt.quit() })
// })}
// }
BlueButton {
id: update
text: "\uf021"
onClicked: {
newsBusy.running=true;
newstab.newstabstatus=login.newsViewType;
root.contactLoadType="news";
var onlynew=true;
//print("newstab "+ JSON.stringify(contactlist));
Newsjs.getFriendsTimeline(login,db,contactlist,onlynew,newstab,function(ns,nc){
root.news=ns;root.newContacts=nc;
if (ns.length==0){// update last 20 existing news for changes and likes
onlynew=false;
Newsjs.getFriendsTimeline(login,db,contactlist,onlynew,newstab,function(rns,rnc){
root.contactLoadType="news";
root.news=rns;root.newContacts=rnc;})
}
})
Service.updateView(newstab.newstabstatus)
}
}
@ -211,7 +407,6 @@ Item {
onClicked:{
var currentTime= new Date();
var lastnews_id=newsModel.get(newsModel.count-1).newsitemobject.created_at;
print("Lastnews ID "+lastnews_id+Qt.atob(newsModel.get(newsModel.count-1).newsitemobject.statusnet_html))
if(newstab.newstabstatus=="Timeline"){
Newsjs.newsfromdb(root.db,root.login.username, function(news){
var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'appendnews':true};
@ -227,11 +422,27 @@ Item {
var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'appendnews':true};
newsWorker.sendMessage(msg);
},newsModel.get(newsModel.count-1).newsitemobject.uid,lastnews_id)}
}
else if (newstab.newstabstatus=="Notifications"){}
else{
newsStack.appendNews=true;
xhr.setParam("max_id",newsModel.get(newsModel.count-1).newsitemobject.id-1);
xhr.get()
}}
}
}
}
Rectangle{
id: newsSearch
color: "#FFFAFA"
y:8*mm
width:root.width
height: 8*mm
visible:false
Search{
anchors.fill: parent
anchors.margins: mm
}
}
ListView {
id: newsView
anchors.fill: parent
@ -245,19 +456,9 @@ Item {
delegate: Newsitem{}
//onContentYChanged:{if(contentY<-8*mm&&contentY>(-8*mm-1)){print("refreshing");
onDragEnded:{if(contentY<-5*mm){//print("refreshing");
newsBusy.running=true;
newstab.newstabstatus=login.newsViewType;
root.contactLoadType="news";
var onlynew=true;
Newsjs.getFriendsTimeline(login,db,contactlist,onlynew,newstab,function(ns,nc){
root.news=ns;root.newContacts=nc;
if (ns.length==0){// update last 20 existing news for changes and likes
onlynew=false;
Newsjs.getFriendsTimeline(login,db,contactlist,onlynew,newstab,function(rns,rnc){
root.contactLoadType="news";
root.news=rns;root.newContacts=rnc;})
}
})
Service.updateView(newstab.newstabstatus)
}}
}
@ -299,47 +500,7 @@ Item {
text:""
}
}
Menu {
id:newstabmenu
MenuItem {
text: qsTr("Timeline")
onTriggered: {
newstab.newstabstatus="Timeline";
newsModel.clear();
try{ Newsjs.newsfromdb(root.db,root.login.username, function(dbnews){
showNews(dbnews)
})}catch(e){Helperjs.showMessage("Error",e,root)}}
}
MenuItem {
text: qsTr("Favorites")
onTriggered:{
newstab.newstabstatus="Favorites";
root.contactLoadType="favorites";
newsBusy.running=true;
Newsjs.requestFavorites(root.login,db,root.contactlist,root,function(ns,nc){
root.news=ns; root.newContacts=nc;
})
}
}
MenuItem {
text: qsTr("Conversations")
onTriggered:{
newsModel.clear();
newstab.newstabstatus="Conversations";
Newsjs.chatsfromdb(db,root.login.username,function(news){showNews(news)})
}
}
MenuItem {
text: qsTr("Notifications")
onTriggered:{
newstab.newstabstatus="Notifications";
newsBusy.running=true;
Newsjs.getNotifications(root.login,db,root,function(news){
showNews(news)}
)}
}
}
Component.onCompleted: {
root.messageSignal.connect(onFriendsMessages);
root.directmessageSignal.connect(onDirectMessage);
@ -347,17 +508,10 @@ Item {
root.uploadSignal.connect(sendUrls);
root.sendtextSignal.connect(sendtext);
try{newsModel.clear()} catch(e){}
//print("imageUrls "+JSON.stringify(imageUrls)+" newsstack.depth:"+newsStack.depth);
//newsStack.push({item:"qrc:/qml/newsqml/MessageSend.qml",properties:{attachImageURLs:[imageUrl]}})
// var imagePicker = Qt.createQmlObject('import QtQuick 2.0; import "qrc:/qml/genericqml";'+
// osSettings.imagePickQml+'{multiple : true; onReady: {'+
// 'if(imageUrls.length==1){root.currentIndex=0;newstab.active=true;root.uploadSignal(imageUrls)} else{'+
// ' root.currentIndex=2;fotostab.active=true;'+
// 'root.uploadSignal(imageUrls)};}}',newstab,"imagePicker");
//SystemDispatcher.setInitialized();
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
if(root.news.length>0){showNews(root.news)}
else{ newstab.newstabstatus=login.newsViewType;
else{ newstab.newstabstatus=login.newsViewType;
if(login.newsViewType=="Timeline"){Newsjs.newsfromdb(db,login.username,function(dbnews){showNews(dbnews)})}
else{Newsjs.chatsfromdb(db,login.username,function(dbnews){showNews(dbnews)})}
}

View File

@ -52,6 +52,11 @@ Item {
var component = Qt.createComponent("qrc:/qml/newsqml/FriendicaActivities.qml");
var imagedialog = component.createObject(friendicaActivities,{"activitymembers": contacts});
}
function findTags(fulltext){
return fulltext.match(/\s+[#]+[A-Za-z0-9-_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]+/g)
}
Rectangle{width:newsitem.width; height: 1; anchors.bottom: newsitem.bottom; color:"light grey"}
Rectangle{
@ -72,7 +77,8 @@ Item {
height: 7*mm
MouseArea{
anchors.fill: parent
onClicked:{showContact(newsitemobject.user)}
onClicked:{
showContact(newsitemobject.user)}
}
onStatusChanged: if (profileImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}
}
@ -82,7 +88,7 @@ Item {
width:parent.width
font.pixelSize: 1.5*mm
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
text: Qt.atob(newsitemobject.user.name)+forumname
text: newsitemobject.user.name+forumname
}
}
Column {
@ -143,7 +149,7 @@ Item {
linkColor: "light green"
id: itemMessage
textFormat: Text.RichText
text:Qt.atob(newsitemobject.statusnet_html)
text:newsitemobject.statusnet_html
width: newsitem.width-8*mm-2
height: Math.min(implicitHeight,3/4*root.height)
wrapMode: Text.Wrap
@ -151,6 +157,14 @@ Item {
onLinkActivated:{
Qt.openUrlExternally(link)}
Component.onCompleted:{
if (newsitemobject.messagetype==0){
var hashtags=[];
hashtags=findTags(newsitemobject.text);
var component = Qt.createComponent("qrc:/qml/newsqml/Hashtag.qml");
for (var tags in hashtags){
var hashtagQml = component.createObject(friendicaActivities,{"text":hashtags[tags].trim()});
}}
if (newsitemobject.attachmentList.length>0){
for(var attachments in newsitemobject.attachmentList){// (newsitemobject.attachmentList[attachments].url);
var attachcomponent = Qt.createQmlObject('import QtQuick 2.0; '+
@ -198,7 +212,7 @@ Item {
text: friendica_activities.likeText
MouseArea{
anchors.fill: parent
onClicked: { showActivityContacts(newsitemobject.like)}
onClicked: { showActivityContacts(newsitemobject.friendica_activities.like)}
}
}
Label{color: "grey"
@ -207,7 +221,7 @@ Item {
text: friendica_activities.dislikeText
MouseArea{
anchors.fill: parent
onClicked: { showActivityContacts(newsitemobject.dislike)}
onClicked: { showActivityContacts(newsitemobject.friendica_activities.dislike)}
}
}
Label{color: "grey"
@ -216,7 +230,7 @@ Item {
text: friendica_activities.attendyesText
MouseArea{
anchors.fill: parent
onClicked: { showActivityContacts(newsitemobject.attendyes)}
onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendyes)}
}}
Label{color: "grey"
height:3.5*mm
@ -224,7 +238,7 @@ Item {
text: friendica_activities.attendnoText
MouseArea{
anchors.fill: parent
onClicked: { showActivityContacts(newsitemobject.attendno)}
onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendno)}
}
}
Label{color: "grey"
@ -233,7 +247,7 @@ Item {
text: friendica_activities.attendmaybeText
MouseArea{
anchors.fill: parent
onClicked: { showActivityContacts(newsitemobject.attendmaybe)}
onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendmaybe)}
}
}
Label{
@ -267,8 +281,8 @@ Item {
}
}
onClicked: {
if(likeCheckbox.checked==true){Newsjs.like(root.login,root.db,1,"like",newsitemobject.status_id,root);dislikeCheckbox.checked=false; model.friendica_activities.self.liked=0 }
else{Newsjs.like(root.login,root.db,0,"like",newsitemobject.status_id,root); model.friendica_activities.self.liked=1}}
if(likeCheckbox.checked==true){Newsjs.like(root.login,root.db,1,"like",newsitemobject.id,root);dislikeCheckbox.checked=false; model.friendica_activities.self.liked=0 }
else{Newsjs.like(root.login,root.db,0,"like",newsitemobject.id,root); model.friendica_activities.self.liked=1}}
}
CheckBox{
id: dislikeCheckbox
@ -289,8 +303,8 @@ Item {
}
}
onClicked: {
if (dislikeCheckbox.checked==true){Newsjs.like(root.login,root.db,1,"dislike",newsitemobject.status_id,root);likeCheckbox.checked=false; model.friendica_activities.self.disliked=0}
else {Newsjs.like(root.login,root.db,0,"dislike",newsitemobject.status_id,root); model.friendica_activities.self.disliked=1}}
if (dislikeCheckbox.checked==true){Newsjs.like(root.login,root.db,1,"dislike",newsitemobject.id,root);likeCheckbox.checked=false; model.friendica_activities.self.disliked=0}
else {Newsjs.like(root.login,root.db,0,"dislike",newsitemobject.id,root); model.friendica_activities.self.disliked=1}}
}
CheckBox {
@ -312,22 +326,23 @@ Item {
checked:(newsitemobject.favorited>0)
onClicked:{
if(favoritedCheckbox.checkedState==Qt.Checked){
Newsjs.favorite(login,true,newsitemobject.status_id,root); model.newsitemobject.favorited=1}
Newsjs.favorite(login,true,newsitemobject.id,root); model.newsitemobject.favorited=1}
else if(favoritedCheckbox.checkedState==Qt.Unchecked){
Newsjs.favorite(login,false,newsitemobject.status_id,root);model.newsitemobject.favorited=0}
Newsjs.favorite(login,false,newsitemobject.id,root);model.newsitemobject.favorited=0}
}
}
Rectangle{
width: 10*mm
height: 4*mm
visible:(newsitemobject.messagetype!==2)
color:"transparent"
Text{
id:newsmenusymbol
color: "grey"
anchors.centerIn: parent
font.pixelSize: 2*mm
font.bold: true
text: "\u22EE"
font.pixelSize: 2.5*mm
font.family:fontAwesome.name
text: "\uf142"
}
MouseArea{
anchors.fill:parent
@ -336,7 +351,7 @@ Item {
Rectangle{
width: 10*mm
height: 4*mm
visible:newstab.newstabstatus!="Conversation"
visible:(newsitemobject.messagetype!==2)&&(newstab.newstabstatus!="Conversation")
color:"transparent"
Text{
id:conversationsymbol
@ -365,7 +380,7 @@ Item {
onTriggered: {
var directmessage=0;
if (newsitemobject.messagetype==1){ directmessage=1}
newsStack.push({item:"qrc:/qml/newsqml/MessageSend.qml",properties:{"reply_to_user": newsitemobject.user.screen_name,"parentId":newsitemobject.status_id,"login":root.login,"directmessage":directmessage}});
newsStack.push({item:"qrc:/qml/newsqml/MessageSend.qml",properties:{"reply_to_user": newsitemobject.user.screen_name,"parentId":newsitemobject.id,"login":root.login,"directmessage":directmessage}});
}
}
MenuItem {
@ -377,7 +392,7 @@ Item {
MenuItem {
text: qsTr("Repost")
onTriggered: {
Newsjs.retweetNews(root.login,db,newsitemobject.status_id,root,function(reply){
Newsjs.retweetNews(root.login,db,newsitemobject.id,root,function(reply){
Helperjs.showMessage("Repost",qsTr("Success!"),root)
})
}
@ -396,17 +411,17 @@ Item {
title: qsTr("Attending")
MenuItem{
text:qsTr("yes")
onTriggered: {Newsjs.attend(root.login,db,"yes",newsitemobject.status_id,root,function(){
onTriggered: {Newsjs.attend(root.login,db,"yes",newsitemobject.id,root,function(){
model.friendica_activities.self.attending="yes";attending="yes"})
}
}
MenuItem{text:qsTr("maybe")
onTriggered: {Newsjs.attend(root.login,db,"maybe",newsitemobject.status_id,root,function(){
onTriggered: {Newsjs.attend(root.login,db,"maybe",newsitemobject.id,root,function(){
model.friendica_activities.self.attending="maybe";attending="maybe"})
}
}
MenuItem{text:qsTr("no")
onTriggered: {Newsjs.attend(root.login,db,"no",newsitemobject.status_id,root,function(){
onTriggered: {Newsjs.attend(root.login,db,"no",newsitemobject.id,root,function(){
model.friendica_activities.self.attending="no";attending="no"})}
}
}
@ -414,7 +429,7 @@ Item {
MenuItem {
text: qsTr("Delete")
onTriggered: {
Newsjs.deleteNews(root.login,root.db,newsitemobject.status_id,newsitemobject.messagetype,root,function(reply){
Newsjs.deleteNews(root.login,root.db,newsitemobject.id,newsitemobject.messagetype,root,function(reply){
var msg = {'deleteId': index, 'model': newsModel};
newsWorker.sendMessage(msg);
})

View File

@ -104,7 +104,7 @@ Package {
Component.onCompleted:{
try {photoModel.clear()}catch (e){print(e)}
if(foreignPicture){
Imagejs.newRequestFriendsPictures(login,albumlink,friend,remoteContact,remoteauth,root,function(obj){
Imagejs.newRequestFriendsPictures(login,albumlink,friend,photoStack.remoteContact,remoteauth,root,function(obj){
if (obj) {
for (var k=0;k<obj.length;k++){
photoModel.append({"imageLocation": obj[k].thumb,"photoDescription":obj[k].name,"photoLink":obj[k].link})

View File

@ -17,76 +17,76 @@
<context>
<name>ConfigTab</name>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="78"/>
<location filename="../qml/configqml/ConfigTab.qml" line="362"/>
<location filename="../qml/configqml/ConfigTab.qml" line="384"/>
<location filename="../qml/configqml/ConfigTab.qml" line="69"/>
<location filename="../qml/configqml/ConfigTab.qml" line="351"/>
<location filename="../qml/configqml/ConfigTab.qml" line="374"/>
<source>User</source>
<translation>Name</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="105"/>
<location filename="../qml/configqml/ConfigTab.qml" line="96"/>
<source>Server</source>
<translation>Server</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="109"/>
<location filename="../qml/configqml/ConfigTab.qml" line="100"/>
<source>Nickname</source>
<translation>Kurzname</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="114"/>
<location filename="../qml/configqml/ConfigTab.qml" line="105"/>
<source>Password</source>
<translation>Passwort</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="118"/>
<location filename="../qml/configqml/ConfigTab.qml" line="109"/>
<source>Image dir.</source>
<translation>Bildverz.</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="123"/>
<location filename="../qml/configqml/ConfigTab.qml" line="114"/>
<source>Max. News</source>
<translation>Max. Nachr.</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="127"/>
<location filename="../qml/configqml/ConfigTab.qml" line="118"/>
<source>News as</source>
<translation>Anzeige</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="131"/>
<location filename="../qml/configqml/ConfigTab.qml" line="122"/>
<source>Interval (0=None)</source>
<translation>Intervall (0=keins)</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="201"/>
<location filename="../qml/configqml/ConfigTab.qml" line="316"/>
<location filename="../qml/configqml/ConfigTab.qml" line="340"/>
<location filename="../qml/configqml/ConfigTab.qml" line="188"/>
<location filename="../qml/configqml/ConfigTab.qml" line="304"/>
<location filename="../qml/configqml/ConfigTab.qml" line="328"/>
<source>Error</source>
<translation>Fehler</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="201"/>
<location filename="../qml/configqml/ConfigTab.qml" line="188"/>
<source>Nickname not registered at given server!</source>
<translation>Name auf der Seite nicht registriert!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="301"/>
<location filename="../qml/configqml/ConfigTab.qml" line="289"/>
<source>Confirm</source>
<translation>Bestätigen</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="305"/>
<location filename="../qml/configqml/ConfigTab.qml" line="293"/>
<source>No server given! </source>
<translation>Kein Server angegeben!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="306"/>
<location filename="../qml/configqml/ConfigTab.qml" line="294"/>
<source>No nickname given! </source>
<translation>Kein Kurzname angegeben!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="307"/>
<location filename="../qml/configqml/ConfigTab.qml" line="295"/>
<source>Nickname not registered at given server! </source>
<translation>Name auf der Seite nicht registriert!</translation>
</message>
@ -95,42 +95,42 @@
<translation type="vanished">Kein Nutzername angegeben!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="308"/>
<location filename="../qml/configqml/ConfigTab.qml" line="296"/>
<source>No password given! </source>
<translation>Kein Passwort angegeben!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="309"/>
<location filename="../qml/configqml/ConfigTab.qml" line="297"/>
<source>No image directory given!</source>
<translation>Kein Verzeichnis für Bilder angegeben!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="310"/>
<location filename="../qml/configqml/ConfigTab.qml" line="298"/>
<source>No maximum news number given!</source>
<translation>Maximale News-Anzahl nicht angegeben!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="316"/>
<location filename="../qml/configqml/ConfigTab.qml" line="304"/>
<source>Wrong password!</source>
<translation>Falsches Passwort!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="335"/>
<location filename="../qml/configqml/ConfigTab.qml" line="323"/>
<source>Success</source>
<translation>Bestätigt</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="335"/>
<location filename="../qml/configqml/ConfigTab.qml" line="323"/>
<source>Name</source>
<translation>Name</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="399"/>
<location filename="../qml/configqml/ConfigTab.qml" line="389"/>
<source>Timeline</source>
<translation>Chronologisch</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="403"/>
<location filename="../qml/configqml/ConfigTab.qml" line="393"/>
<source>Conversations</source>
<translation>Unterhaltungen</translation>
</message>
@ -189,12 +189,12 @@
<translation>Freunde</translation>
</message>
<message>
<location filename="../qml/contactqml/FriendsTab.qml" line="200"/>
<location filename="../qml/contactqml/FriendsTab.qml" line="202"/>
<source>Contacts</source>
<translation>Kontakte</translation>
</message>
<message>
<location filename="../qml/contactqml/FriendsTab.qml" line="253"/>
<location filename="../qml/contactqml/FriendsTab.qml" line="259"/>
<source>Groups</source>
<translation>Gruppen</translation>
</message>
@ -213,32 +213,37 @@
<context>
<name>ImageUploadDialog</name>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="127"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="100"/>
<source>Upload to album</source>
<translation>In Album hochladen</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="121"/>
<source>Album</source>
<translation>Album</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="132"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="126"/>
<source>Image</source>
<translation>Bild</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="137"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="131"/>
<source>Description</source>
<translation>Beschreibung</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="236"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="229"/>
<source>Upload</source>
<translation>Hochladen</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="239"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="232"/>
<source>Error</source>
<translation>Fehler</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="239"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="232"/>
<source> No album name given</source>
<translation>Kein Albumname angegeben</translation>
</message>
@ -246,17 +251,17 @@
<context>
<name>MessageSend</name>
<message>
<location filename="../qml/newsqml/MessageSend.qml" line="98"/>
<location filename="../qml/newsqml/MessageSend.qml" line="111"/>
<source>Title (optional)</source>
<translation>Überschrift (optional)</translation>
</message>
<message>
<location filename="../qml/newsqml/MessageSend.qml" line="180"/>
<location filename="../qml/newsqml/MessageSend.qml" line="190"/>
<source>Error</source>
<translation>Fehler</translation>
</message>
<message>
<location filename="../qml/newsqml/MessageSend.qml" line="180"/>
<location filename="../qml/newsqml/MessageSend.qml" line="190"/>
<source>Only one attachment supported at the moment.
Remove other attachment first!</source>
<translation>Nur ein Anhang derzeit unterstützt.
@ -270,30 +275,55 @@
<translation type="vanished">Lade Profilbild für </translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="204"/>
<location filename="../qml/newsqml/NewsTab.qml" line="404"/>
<source>More</source>
<translation>Mehr</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="301"/>
<location filename="../qml/newsqml/NewsTab.qml" line="281"/>
<source>Timeline</source>
<translation>Chronologisch</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="310"/>
<location filename="../qml/newsqml/NewsTab.qml" line="63"/>
<source>Error</source>
<translation>Fehler</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="298"/>
<source>Favorites</source>
<translation>Markierte News</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="322"/>
<location filename="../qml/newsqml/NewsTab.qml" line="290"/>
<source>Conversations</source>
<translation>Unterhaltungen</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="330"/>
<location filename="../qml/newsqml/NewsTab.qml" line="306"/>
<source>Public timeline</source>
<translation>Gemeinschaft</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="314"/>
<source>Direct Messages</source>
<translation>Direktnachrichten</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="321"/>
<source>Notifications</source>
<translation>Meldungen</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="328"/>
<source>Group news</source>
<translation>News Gruppe</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="332"/>
<source>Quit</source>
<translation>Schliessen</translation>
</message>
</context>
<context>
<name>Newsitem</name>
@ -303,77 +333,77 @@
<translation>Teilnahme</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="99"/>
<location filename="../qml/newsqml/Newsitem.qml" line="105"/>
<source>Source: </source>
<translation>Quelle: </translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="100"/>
<location filename="../qml/newsqml/Newsitem.qml" line="106"/>
<source>Direct Message</source>
<translation>Direktnachricht</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="115"/>
<location filename="../qml/newsqml/Newsitem.qml" line="121"/>
<source>In reply to </source>
<translation>Antwort an </translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="127"/>
<location filename="../qml/newsqml/Newsitem.qml" line="133"/>
<source> comments</source>
<translation> Kommentare</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="221"/>
<location filename="../qml/newsqml/Newsitem.qml" line="258"/>
<source>Attending: </source>
<translation>Teilnahme: </translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="343"/>
<location filename="../qml/newsqml/Newsitem.qml" line="378"/>
<source>Reply</source>
<translation>Antworten</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="351"/>
<location filename="../qml/newsqml/Newsitem.qml" line="386"/>
<source>DM</source>
<translation>Direktnachricht</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="357"/>
<location filename="../qml/newsqml/Newsitem.qml" line="392"/>
<source>Repost</source>
<translation>Teilen</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="360"/>
<location filename="../qml/newsqml/Newsitem.qml" line="395"/>
<source>Success!</source>
<translation>Erledigt!</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="365"/>
<location filename="../qml/newsqml/Newsitem.qml" line="400"/>
<source>Conversation</source>
<translation>Unterhaltung</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="376"/>
<location filename="../qml/newsqml/Newsitem.qml" line="410"/>
<source>Attending</source>
<translation>Teilnahme</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="378"/>
<location filename="../qml/newsqml/Newsitem.qml" line="412"/>
<source>yes</source>
<translation>ja</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="383"/>
<location filename="../qml/newsqml/Newsitem.qml" line="417"/>
<source>maybe</source>
<translation>vielleicht</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="388"/>
<location filename="../qml/newsqml/Newsitem.qml" line="422"/>
<source>no</source>
<translation>nein</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="395"/>
<location filename="../qml/newsqml/Newsitem.qml" line="429"/>
<source>Delete</source>
<translation>Löschen</translation>
</message>
@ -394,28 +424,28 @@
<context>
<name>PhotoTab</name>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="115"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="121"/>
<source>&apos;s images</source>
<translation>s Bilder</translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="167"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="178"/>
<source>All Images</source>
<translation>Alle Bilder</translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="172"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="183"/>
<source>Only new</source>
<translation>Nur neue</translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="186"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="190"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="197"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="201"/>
<source>Own Images</source>
<translation>Eigene Bilder</translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="227"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="238"/>
<source>More</source>
<translation>Mehr</translation>
</message>
@ -613,32 +643,32 @@
<translation>Aktualisieren</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="206"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="208"/>
<source>profile id</source>
<translation>Profil-Nummer</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="229"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="232"/>
<source>Description</source>
<translation>Beschreibung</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="229"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="232"/>
<source>Location</source>
<translation>Ort</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="229"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="232"/>
<source>Posts</source>
<translation>Beiträge</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="230"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="233"/>
<source>URL</source>
<translation>Profilseite</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="231"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="234"/>
<source>Created at</source>
<translation>Erstellt</translation>
</message>
@ -714,27 +744,26 @@
<translation>Personen nehmen vielleicht teil.</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="77"/>
<location filename="../js/newsworker.js" line="78"/>
<source>yes</source>
<translation>ja</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="78"/>
<location filename="../js/newsworker.js" line="79"/>
<source>no</source>
<translation>nein</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="79"/>
<location filename="../js/newsworker.js" line="80"/>
<source>maybe</source>
<translation>vielleicht</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="95"/>
<location filename="../js/newsworker.js" line="96"/>
<source>seconds</source>
<translation>Sekunden</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="95"/>
<location filename="../js/newsworker.js" line="96"/>
<location filename="../js/newsworker.js" line="97"/>
<location filename="../js/newsworker.js" line="98"/>
@ -744,53 +773,64 @@
<location filename="../js/newsworker.js" line="102"/>
<location filename="../js/newsworker.js" line="103"/>
<location filename="../js/newsworker.js" line="104"/>
<location filename="../js/newsworker.js" line="105"/>
<source>ago</source>
<translation>her</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="96"/>
<location filename="../js/newsworker.js" line="97"/>
<source>minute</source>
<translation>Minute</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="97"/>
<location filename="../js/newsworker.js" line="98"/>
<source>minutes</source>
<translation>Minuten</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="98"/>
<location filename="../js/newsworker.js" line="99"/>
<source>hour</source>
<translation>Stunde</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="99"/>
<location filename="../js/newsworker.js" line="100"/>
<source>hours</source>
<translation>Stunden</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="100"/>
<location filename="../js/newsworker.js" line="101"/>
<source>day</source>
<translation>Tag</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="101"/>
<location filename="../js/newsworker.js" line="102"/>
<source>days</source>
<translation>Tage</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="102"/>
<location filename="../js/newsworker.js" line="103"/>
<source>month</source>
<translation>Monat</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="103"/>
<location filename="../js/newsworker.js" line="104"/>
<source>months</source>
<translation>Monate</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="104"/>
<location filename="../js/newsworker.js" line="105"/>
<source>years</source>
<translation></translation>
</message>
</context>
<context>
<name>service</name>
<message>
<location filename="../js/service.js" line="360"/>
<location filename="../js/service.js" line="362"/>
<location filename="../js/service.js" line="365"/>
<source>Error</source>
<translation>Fehler</translation>
</message>
</context>
</TS>

View File

@ -17,76 +17,76 @@
<context>
<name>ConfigTab</name>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="78"/>
<location filename="../qml/configqml/ConfigTab.qml" line="362"/>
<location filename="../qml/configqml/ConfigTab.qml" line="384"/>
<location filename="../qml/configqml/ConfigTab.qml" line="69"/>
<location filename="../qml/configqml/ConfigTab.qml" line="351"/>
<location filename="../qml/configqml/ConfigTab.qml" line="374"/>
<source>User</source>
<translation>Usuario</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="105"/>
<location filename="../qml/configqml/ConfigTab.qml" line="96"/>
<source>Server</source>
<translation>Servidor</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="109"/>
<location filename="../qml/configqml/ConfigTab.qml" line="100"/>
<source>Nickname</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="114"/>
<location filename="../qml/configqml/ConfigTab.qml" line="105"/>
<source>Password</source>
<translation>Contraseña</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="118"/>
<location filename="../qml/configqml/ConfigTab.qml" line="109"/>
<source>Image dir.</source>
<translation>Dir. de imágenes</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="123"/>
<location filename="../qml/configqml/ConfigTab.qml" line="114"/>
<source>Max. News</source>
<translation> Max. de noticias.</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="127"/>
<location filename="../qml/configqml/ConfigTab.qml" line="118"/>
<source>News as</source>
<translation>Noticias como</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="131"/>
<location filename="../qml/configqml/ConfigTab.qml" line="122"/>
<source>Interval (0=None)</source>
<translation>Intervalo (0=ningún)</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="201"/>
<location filename="../qml/configqml/ConfigTab.qml" line="316"/>
<location filename="../qml/configqml/ConfigTab.qml" line="340"/>
<location filename="../qml/configqml/ConfigTab.qml" line="188"/>
<location filename="../qml/configqml/ConfigTab.qml" line="304"/>
<location filename="../qml/configqml/ConfigTab.qml" line="328"/>
<source>Error</source>
<translation type="unfinished">Error</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="201"/>
<location filename="../qml/configqml/ConfigTab.qml" line="188"/>
<source>Nickname not registered at given server!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="301"/>
<location filename="../qml/configqml/ConfigTab.qml" line="289"/>
<source>Confirm</source>
<translation>Confirmar</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="305"/>
<location filename="../qml/configqml/ConfigTab.qml" line="293"/>
<source>No server given! </source>
<translation>¡Servidor no encontrado!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="306"/>
<location filename="../qml/configqml/ConfigTab.qml" line="294"/>
<source>No nickname given! </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="307"/>
<location filename="../qml/configqml/ConfigTab.qml" line="295"/>
<source>Nickname not registered at given server! </source>
<translation type="unfinished"></translation>
</message>
@ -95,42 +95,42 @@
<translation type="vanished">¡Usuario incorrecto!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="308"/>
<location filename="../qml/configqml/ConfigTab.qml" line="296"/>
<source>No password given! </source>
<translation>¡Contraseña incorrecta!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="309"/>
<location filename="../qml/configqml/ConfigTab.qml" line="297"/>
<source>No image directory given!</source>
<translation>¡No se ha encontrado el directorio de imágenes!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="310"/>
<location filename="../qml/configqml/ConfigTab.qml" line="298"/>
<source>No maximum news number given!</source>
<translation>¡ máximo de noticias incorrecto!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="316"/>
<location filename="../qml/configqml/ConfigTab.qml" line="304"/>
<source>Wrong password!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="335"/>
<location filename="../qml/configqml/ConfigTab.qml" line="323"/>
<source>Success</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="335"/>
<location filename="../qml/configqml/ConfigTab.qml" line="323"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="399"/>
<location filename="../qml/configqml/ConfigTab.qml" line="389"/>
<source>Timeline</source>
<translation>Cronología</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="403"/>
<location filename="../qml/configqml/ConfigTab.qml" line="393"/>
<source>Conversations</source>
<translation>Conversaciones</translation>
</message>
@ -189,12 +189,12 @@
<translation>Amigos</translation>
</message>
<message>
<location filename="../qml/contactqml/FriendsTab.qml" line="200"/>
<location filename="../qml/contactqml/FriendsTab.qml" line="202"/>
<source>Contacts</source>
<translation>Contactos</translation>
</message>
<message>
<location filename="../qml/contactqml/FriendsTab.qml" line="253"/>
<location filename="../qml/contactqml/FriendsTab.qml" line="259"/>
<source>Groups</source>
<translation>Grupos</translation>
</message>
@ -202,32 +202,37 @@
<context>
<name>ImageUploadDialog</name>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="127"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="100"/>
<source>Upload to album</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="121"/>
<source>Album</source>
<translation>álbum</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="132"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="126"/>
<source>Image</source>
<translation>imagen</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="137"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="131"/>
<source>Description</source>
<translation>Descripción</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="236"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="229"/>
<source>Upload</source>
<translation>Subir</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="239"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="232"/>
<source>Error</source>
<translation>Error</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="239"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="232"/>
<source> No album name given</source>
<translation>¡Nombre del álbum no encontrado!</translation>
</message>
@ -235,17 +240,17 @@
<context>
<name>MessageSend</name>
<message>
<location filename="../qml/newsqml/MessageSend.qml" line="98"/>
<location filename="../qml/newsqml/MessageSend.qml" line="111"/>
<source>Title (optional)</source>
<translation>Título (opcional)</translation>
</message>
<message>
<location filename="../qml/newsqml/MessageSend.qml" line="180"/>
<location filename="../qml/newsqml/MessageSend.qml" line="190"/>
<source>Error</source>
<translation>Error</translation>
</message>
<message>
<location filename="../qml/newsqml/MessageSend.qml" line="180"/>
<location filename="../qml/newsqml/MessageSend.qml" line="190"/>
<source>Only one attachment supported at the moment.
Remove other attachment first!</source>
<translation>Solo se admite adjuntar un solo archivo en este momento.
@ -259,30 +264,55 @@
<translation type="vanished">Descargar la imagen del perfil para </translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="204"/>
<location filename="../qml/newsqml/NewsTab.qml" line="404"/>
<source>More</source>
<translation>Mas</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="301"/>
<location filename="../qml/newsqml/NewsTab.qml" line="281"/>
<source>Timeline</source>
<translation>Cronología</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="310"/>
<location filename="../qml/newsqml/NewsTab.qml" line="63"/>
<source>Error</source>
<translation type="unfinished">Error</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="298"/>
<source>Favorites</source>
<translation>Favoritos</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="322"/>
<location filename="../qml/newsqml/NewsTab.qml" line="290"/>
<source>Conversations</source>
<translation>Conversaciones</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="330"/>
<location filename="../qml/newsqml/NewsTab.qml" line="306"/>
<source>Public timeline</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="314"/>
<source>Direct Messages</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="321"/>
<source>Notifications</source>
<translation>Notificaciones</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="328"/>
<source>Group news</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="332"/>
<source>Quit</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Newsitem</name>
@ -292,77 +322,77 @@
<translation>Asistiendo: </translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="99"/>
<location filename="../qml/newsqml/Newsitem.qml" line="105"/>
<source>Source: </source>
<translation>Fuente: </translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="100"/>
<location filename="../qml/newsqml/Newsitem.qml" line="106"/>
<source>Direct Message</source>
<translation>Mensaje directo</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="115"/>
<location filename="../qml/newsqml/Newsitem.qml" line="121"/>
<source>In reply to </source>
<translation>En respuesta a </translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="127"/>
<location filename="../qml/newsqml/Newsitem.qml" line="133"/>
<source> comments</source>
<translation> comentarios</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="221"/>
<location filename="../qml/newsqml/Newsitem.qml" line="258"/>
<source>Attending: </source>
<translation>Asistiendo: </translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="343"/>
<location filename="../qml/newsqml/Newsitem.qml" line="378"/>
<source>Reply</source>
<translation>Respuesta</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="351"/>
<location filename="../qml/newsqml/Newsitem.qml" line="386"/>
<source>DM</source>
<translation>Mensaje directo</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="357"/>
<location filename="../qml/newsqml/Newsitem.qml" line="392"/>
<source>Repost</source>
<translation>Volver a publicar</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="360"/>
<location filename="../qml/newsqml/Newsitem.qml" line="395"/>
<source>Success!</source>
<translation>éxito!</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="365"/>
<location filename="../qml/newsqml/Newsitem.qml" line="400"/>
<source>Conversation</source>
<translation>Conversación</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="376"/>
<location filename="../qml/newsqml/Newsitem.qml" line="410"/>
<source>Attending</source>
<translation>Asistiendo</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="378"/>
<location filename="../qml/newsqml/Newsitem.qml" line="412"/>
<source>yes</source>
<translation>si</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="383"/>
<location filename="../qml/newsqml/Newsitem.qml" line="417"/>
<source>maybe</source>
<translation>quizás</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="388"/>
<location filename="../qml/newsqml/Newsitem.qml" line="422"/>
<source>no</source>
<translation>no</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="395"/>
<location filename="../qml/newsqml/Newsitem.qml" line="429"/>
<source>Delete</source>
<translation>Borrar</translation>
</message>
@ -383,28 +413,28 @@
<context>
<name>PhotoTab</name>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="115"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="121"/>
<source>&apos;s images</source>
<translation>s Imágenes</translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="167"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="178"/>
<source>All Images</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="172"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="183"/>
<source>Only new</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="186"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="190"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="197"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="201"/>
<source>Own Images</source>
<translation>Mis imágenes</translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="227"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="238"/>
<source>More</source>
<translation>Mas</translation>
</message>
@ -602,32 +632,32 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="206"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="208"/>
<source>profile id</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="229"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="232"/>
<source>Description</source>
<translation type="unfinished">Descripción</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="229"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="232"/>
<source>Location</source>
<translation type="unfinished">Localización</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="229"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="232"/>
<source>Posts</source>
<translation type="unfinished">Mensajes</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="230"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="233"/>
<source>URL</source>
<translation type="unfinished">URL</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="231"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="234"/>
<source>Created at</source>
<translation type="unfinished">Creado en</translation>
</message>
@ -703,27 +733,26 @@
<translation>Personas que pueden asistir.</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="77"/>
<location filename="../js/newsworker.js" line="78"/>
<source>yes</source>
<translation>si</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="78"/>
<location filename="../js/newsworker.js" line="79"/>
<source>no</source>
<translation>no</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="79"/>
<location filename="../js/newsworker.js" line="80"/>
<source>maybe</source>
<translation>quizás</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="95"/>
<location filename="../js/newsworker.js" line="96"/>
<source>seconds</source>
<translation>Segundos</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="95"/>
<location filename="../js/newsworker.js" line="96"/>
<location filename="../js/newsworker.js" line="97"/>
<location filename="../js/newsworker.js" line="98"/>
@ -733,53 +762,64 @@
<location filename="../js/newsworker.js" line="102"/>
<location filename="../js/newsworker.js" line="103"/>
<location filename="../js/newsworker.js" line="104"/>
<location filename="../js/newsworker.js" line="105"/>
<source>ago</source>
<translation>hace</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="96"/>
<location filename="../js/newsworker.js" line="97"/>
<source>minute</source>
<translation>Minuto</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="97"/>
<location filename="../js/newsworker.js" line="98"/>
<source>minutes</source>
<translation>Minutos</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="98"/>
<location filename="../js/newsworker.js" line="99"/>
<source>hour</source>
<translation>Hora</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="99"/>
<location filename="../js/newsworker.js" line="100"/>
<source>hours</source>
<translation>Horas</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="100"/>
<location filename="../js/newsworker.js" line="101"/>
<source>day</source>
<translation>Dia</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="101"/>
<location filename="../js/newsworker.js" line="102"/>
<source>days</source>
<translation>Dias</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="102"/>
<location filename="../js/newsworker.js" line="103"/>
<source>month</source>
<translation>Mes</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="103"/>
<location filename="../js/newsworker.js" line="104"/>
<source>months</source>
<translation>Meses</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="104"/>
<location filename="../js/newsworker.js" line="105"/>
<source>years</source>
<translation>Años</translation>
</message>
</context>
<context>
<name>service</name>
<message>
<location filename="../js/service.js" line="360"/>
<location filename="../js/service.js" line="362"/>
<location filename="../js/service.js" line="365"/>
<source>Error</source>
<translation type="unfinished">Error</translation>
</message>
</context>
</TS>

View File

@ -17,76 +17,76 @@
<context>
<name>ConfigTab</name>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="78"/>
<location filename="../qml/configqml/ConfigTab.qml" line="362"/>
<location filename="../qml/configqml/ConfigTab.qml" line="384"/>
<location filename="../qml/configqml/ConfigTab.qml" line="69"/>
<location filename="../qml/configqml/ConfigTab.qml" line="351"/>
<location filename="../qml/configqml/ConfigTab.qml" line="374"/>
<source>User</source>
<translation>Utente</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="105"/>
<location filename="../qml/configqml/ConfigTab.qml" line="96"/>
<source>Server</source>
<translation>Server</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="109"/>
<location filename="../qml/configqml/ConfigTab.qml" line="100"/>
<source>Nickname</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="114"/>
<location filename="../qml/configqml/ConfigTab.qml" line="105"/>
<source>Password</source>
<translation>Password</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="118"/>
<location filename="../qml/configqml/ConfigTab.qml" line="109"/>
<source>Image dir.</source>
<translation>Directory immagini</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="123"/>
<location filename="../qml/configqml/ConfigTab.qml" line="114"/>
<source>Max. News</source>
<translation> Max. di notizie</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="127"/>
<location filename="../qml/configqml/ConfigTab.qml" line="118"/>
<source>News as</source>
<translation>News come</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="131"/>
<location filename="../qml/configqml/ConfigTab.qml" line="122"/>
<source>Interval (0=None)</source>
<translation>Intervallo (0=nessuno)</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="201"/>
<location filename="../qml/configqml/ConfigTab.qml" line="316"/>
<location filename="../qml/configqml/ConfigTab.qml" line="340"/>
<location filename="../qml/configqml/ConfigTab.qml" line="188"/>
<location filename="../qml/configqml/ConfigTab.qml" line="304"/>
<location filename="../qml/configqml/ConfigTab.qml" line="328"/>
<source>Error</source>
<translation type="unfinished">Errore</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="201"/>
<location filename="../qml/configqml/ConfigTab.qml" line="188"/>
<source>Nickname not registered at given server!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="301"/>
<location filename="../qml/configqml/ConfigTab.qml" line="289"/>
<source>Confirm</source>
<translation>Conferma</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="305"/>
<location filename="../qml/configqml/ConfigTab.qml" line="293"/>
<source>No server given! </source>
<translation>Nessun server inserito!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="306"/>
<location filename="../qml/configqml/ConfigTab.qml" line="294"/>
<source>No nickname given! </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="307"/>
<location filename="../qml/configqml/ConfigTab.qml" line="295"/>
<source>Nickname not registered at given server! </source>
<translation type="unfinished"></translation>
</message>
@ -95,42 +95,42 @@
<translation type="vanished">Nessun utente inserito!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="308"/>
<location filename="../qml/configqml/ConfigTab.qml" line="296"/>
<source>No password given! </source>
<translation>Nessuna password inserita!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="309"/>
<location filename="../qml/configqml/ConfigTab.qml" line="297"/>
<source>No image directory given!</source>
<translation>Nessuna directory immagini inserita!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="310"/>
<location filename="../qml/configqml/ConfigTab.qml" line="298"/>
<source>No maximum news number given!</source>
<translation>Nessun numero massimo di news inserito!</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="316"/>
<location filename="../qml/configqml/ConfigTab.qml" line="304"/>
<source>Wrong password!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="335"/>
<location filename="../qml/configqml/ConfigTab.qml" line="323"/>
<source>Success</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="335"/>
<location filename="../qml/configqml/ConfigTab.qml" line="323"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="399"/>
<location filename="../qml/configqml/ConfigTab.qml" line="389"/>
<source>Timeline</source>
<translation>Cronologia</translation>
</message>
<message>
<location filename="../qml/configqml/ConfigTab.qml" line="403"/>
<location filename="../qml/configqml/ConfigTab.qml" line="393"/>
<source>Conversations</source>
<translation>Conversazioni</translation>
</message>
@ -189,12 +189,12 @@
<translation>Amici</translation>
</message>
<message>
<location filename="../qml/contactqml/FriendsTab.qml" line="200"/>
<location filename="../qml/contactqml/FriendsTab.qml" line="202"/>
<source>Contacts</source>
<translation>Contatti</translation>
</message>
<message>
<location filename="../qml/contactqml/FriendsTab.qml" line="253"/>
<location filename="../qml/contactqml/FriendsTab.qml" line="259"/>
<source>Groups</source>
<translation>Gruppi</translation>
</message>
@ -202,32 +202,37 @@
<context>
<name>ImageUploadDialog</name>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="127"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="100"/>
<source>Upload to album</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="121"/>
<source>Album</source>
<translation>Album</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="132"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="126"/>
<source>Image</source>
<translation>Immagine</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="137"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="131"/>
<source>Description</source>
<translation>Descrizione</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="236"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="229"/>
<source>Upload</source>
<translation>Carica</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="239"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="232"/>
<source>Error</source>
<translation>Errore</translation>
</message>
<message>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="239"/>
<location filename="../qml/photoqml/ImageUploadDialog.qml" line="232"/>
<source> No album name given</source>
<translation>Nessun nome album inserito!</translation>
</message>
@ -235,17 +240,17 @@
<context>
<name>MessageSend</name>
<message>
<location filename="../qml/newsqml/MessageSend.qml" line="98"/>
<location filename="../qml/newsqml/MessageSend.qml" line="111"/>
<source>Title (optional)</source>
<translation>Titolo (opzionale)</translation>
</message>
<message>
<location filename="../qml/newsqml/MessageSend.qml" line="180"/>
<location filename="../qml/newsqml/MessageSend.qml" line="190"/>
<source>Error</source>
<translation>Errore</translation>
</message>
<message>
<location filename="../qml/newsqml/MessageSend.qml" line="180"/>
<location filename="../qml/newsqml/MessageSend.qml" line="190"/>
<source>Only one attachment supported at the moment.
Remove other attachment first!</source>
<translation>Solo un allegato è attualmente supportato.
@ -259,30 +264,55 @@
<translation type="vanished">Download immagine profilo per </translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="204"/>
<location filename="../qml/newsqml/NewsTab.qml" line="404"/>
<source>More</source>
<translation>Ancora</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="301"/>
<location filename="../qml/newsqml/NewsTab.qml" line="281"/>
<source>Timeline</source>
<translation>Cronologia</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="310"/>
<location filename="../qml/newsqml/NewsTab.qml" line="63"/>
<source>Error</source>
<translation type="unfinished">Errore</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="298"/>
<source>Favorites</source>
<translation>Favoriti</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="322"/>
<location filename="../qml/newsqml/NewsTab.qml" line="290"/>
<source>Conversations</source>
<translation>Conversazioni</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="330"/>
<location filename="../qml/newsqml/NewsTab.qml" line="306"/>
<source>Public timeline</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="314"/>
<source>Direct Messages</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="321"/>
<source>Notifications</source>
<translation>Notifiche</translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="328"/>
<source>Group news</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/newsqml/NewsTab.qml" line="332"/>
<source>Quit</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Newsitem</name>
@ -292,77 +322,77 @@
<translation>attendere: </translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="99"/>
<location filename="../qml/newsqml/Newsitem.qml" line="105"/>
<source>Source: </source>
<translation>Codice: </translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="100"/>
<location filename="../qml/newsqml/Newsitem.qml" line="106"/>
<source>Direct Message</source>
<translation>Messaggio diretto</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="115"/>
<location filename="../qml/newsqml/Newsitem.qml" line="121"/>
<source>In reply to </source>
<translation>In risposta a </translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="127"/>
<location filename="../qml/newsqml/Newsitem.qml" line="133"/>
<source> comments</source>
<translation> commenti</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="221"/>
<location filename="../qml/newsqml/Newsitem.qml" line="258"/>
<source>Attending: </source>
<translation>Attendi: </translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="343"/>
<location filename="../qml/newsqml/Newsitem.qml" line="378"/>
<source>Reply</source>
<translation>Risposta</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="351"/>
<location filename="../qml/newsqml/Newsitem.qml" line="386"/>
<source>DM</source>
<translation>Messaggio diretto</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="357"/>
<location filename="../qml/newsqml/Newsitem.qml" line="392"/>
<source>Repost</source>
<translation>Condividi</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="360"/>
<location filename="../qml/newsqml/Newsitem.qml" line="395"/>
<source>Success!</source>
<translation>Ha funzionato!</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="365"/>
<location filename="../qml/newsqml/Newsitem.qml" line="400"/>
<source>Conversation</source>
<translation>Conversazione</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="376"/>
<location filename="../qml/newsqml/Newsitem.qml" line="410"/>
<source>Attending</source>
<translation>Attendi</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="378"/>
<location filename="../qml/newsqml/Newsitem.qml" line="412"/>
<source>yes</source>
<translation>si</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="383"/>
<location filename="../qml/newsqml/Newsitem.qml" line="417"/>
<source>maybe</source>
<translation>potrebbe</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="388"/>
<location filename="../qml/newsqml/Newsitem.qml" line="422"/>
<source>no</source>
<translation>no</translation>
</message>
<message>
<location filename="../qml/newsqml/Newsitem.qml" line="395"/>
<location filename="../qml/newsqml/Newsitem.qml" line="429"/>
<source>Delete</source>
<translation>Cancella</translation>
</message>
@ -383,28 +413,28 @@
<context>
<name>PhotoTab</name>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="115"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="121"/>
<source>&apos;s images</source>
<translation> Immagini</translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="167"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="178"/>
<source>All Images</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="172"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="183"/>
<source>Only new</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="186"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="190"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="197"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="201"/>
<source>Own Images</source>
<translation>Mie immagini</translation>
</message>
<message>
<location filename="../qml/photoqml/PhotoTab.qml" line="227"/>
<location filename="../qml/photoqml/PhotoTab.qml" line="238"/>
<source>More</source>
<translation>Ancora</translation>
</message>
@ -602,32 +632,32 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="206"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="208"/>
<source>profile id</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="229"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="232"/>
<source>Description</source>
<translation type="unfinished">Descrizione</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="229"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="232"/>
<source>Location</source>
<translation type="unfinished">Località</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="229"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="232"/>
<source>Posts</source>
<translation type="unfinished">Messaggi</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="230"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="233"/>
<source>URL</source>
<translation type="unfinished">URL</translation>
</message>
<message>
<location filename="../qml/contactqml/ProfileComponent.qml" line="231"/>
<location filename="../qml/contactqml/ProfileComponent.qml" line="234"/>
<source>Created at</source>
<translation type="unfinished">Creato il</translation>
</message>
@ -703,27 +733,26 @@
<translation>Persone che possono attendere.</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="77"/>
<location filename="../js/newsworker.js" line="78"/>
<source>yes</source>
<translation>si</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="78"/>
<location filename="../js/newsworker.js" line="79"/>
<source>no</source>
<translation>no</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="79"/>
<location filename="../js/newsworker.js" line="80"/>
<source>maybe</source>
<translation>potrebbe</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="95"/>
<location filename="../js/newsworker.js" line="96"/>
<source>seconds</source>
<translation>secondi</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="95"/>
<location filename="../js/newsworker.js" line="96"/>
<location filename="../js/newsworker.js" line="97"/>
<location filename="../js/newsworker.js" line="98"/>
@ -733,53 +762,64 @@
<location filename="../js/newsworker.js" line="102"/>
<location filename="../js/newsworker.js" line="103"/>
<location filename="../js/newsworker.js" line="104"/>
<location filename="../js/newsworker.js" line="105"/>
<source>ago</source>
<translation>fa</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="96"/>
<location filename="../js/newsworker.js" line="97"/>
<source>minute</source>
<translation>minuti</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="97"/>
<location filename="../js/newsworker.js" line="98"/>
<source>minutes</source>
<translation>minuti</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="98"/>
<location filename="../js/newsworker.js" line="99"/>
<source>hour</source>
<translation>ora</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="99"/>
<location filename="../js/newsworker.js" line="100"/>
<source>hours</source>
<translation>ore</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="100"/>
<location filename="../js/newsworker.js" line="101"/>
<source>day</source>
<translation>giorno</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="101"/>
<location filename="../js/newsworker.js" line="102"/>
<source>days</source>
<translation>giorni</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="102"/>
<location filename="../js/newsworker.js" line="103"/>
<source>month</source>
<translation>mese</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="103"/>
<location filename="../js/newsworker.js" line="104"/>
<source>months</source>
<translation>mesi</translation>
</message>
<message>
<location filename="../js/newsworker.js" line="104"/>
<location filename="../js/newsworker.js" line="105"/>
<source>years</source>
<translation>anni</translation>
</message>
</context>
<context>
<name>service</name>
<message>
<location filename="../js/service.js" line="360"/>
<location filename="../js/service.js" line="362"/>
<location filename="../js/service.js" line="365"/>
<source>Error</source>
<translation type="unfinished">Errore</translation>
</message>
</context>
</TS>