From 5032c78de12decf414cd9eab8669e1ac79333015 Mon Sep 17 00:00:00 2001 From: LubuWest Date: Tue, 1 Mar 2022 21:59:21 +0100 Subject: [PATCH] v0.6.4 contact search --- CHANGELOG.md | 12 + README.md | 15 +- source-android/android/AndroidManifest.xml | 6 +- source-android/friendiqa.pro | 7 +- source-android/qml/friendiqa.qml | 19 +- source-linux/CMakeLists.txt | 62 +- source-linux/application.qrc | 4 +- source-linux/common/filesystem.cpp | 2 - source-linux/common/friendiqa.cpp | 3 + source-linux/common/updatenews.cpp | 186 +++--- source-linux/common/updatenews.h | 4 + source-linux/common/xhr.cpp | 9 +- source-linux/common/xhr.h | 2 +- source-linux/images/Friendiqa.ico | Bin 0 -> 2086 bytes ...iqa.desktop => de.manic.Friendiqa.desktop} | 2 +- .../{Friendiqa.svg => de.manic.Friendiqa.svg} | 0 source-linux/js/helper.js | 6 +- source-linux/js/news.js | 440 +++++++------ source-linux/js/newsworker.js | 171 +++-- source-linux/js/service.js | 600 +++++++++--------- source-linux/js/smiley.js | 138 ++-- source-linux/qml/calendarqml/CalendarTab.qml | 3 +- source-linux/qml/configqml/AccountPage.qml | 3 +- source-linux/qml/configqml/InfoBox.qml | 5 +- source-linux/qml/configqml/RegisterPage.qml | 57 -- .../contactqml/ContactDetailsComponent.qml | 177 ------ .../qml/contactqml/ContactsListTab.qml | 52 +- .../qml/contactqml/ContactsSearchPage.qml | 169 +++++ .../qml/contactqml/FriendsListTab.qml | 57 +- source-linux/qml/contactqml/FriendsTab.qml | 16 +- .../qml/contactqml/GroupComponent.qml | 120 +--- source-linux/qml/contactqml/GroupsListTab.qml | 24 +- source-linux/qml/friendiqa.qml | 47 +- .../qml/genericqml/ContactComponent.qml | 40 +- .../qml/genericqml/LeftDrawerLinux.qml | 2 +- source-linux/qml/genericqml/LinuxSync.qml | 1 + .../qml/genericqml/PermissionDialog.qml | 278 ++++---- source-linux/qml/genericqml/Search.qml | 6 +- source-linux/qml/newsqml/ContactPage.qml | 52 +- source-linux/qml/newsqml/MessageSend.qml | 84 +-- source-linux/qml/newsqml/NewsImage.qml | 2 +- source-linux/qml/newsqml/NewsPhotolist.qml | 2 +- source-linux/qml/newsqml/NewsStack.qml | 49 +- source-linux/qml/newsqml/NewsVideo.qml | 5 - source-linux/qml/newsqml/NewsYplayer.qml | 77 --- source-linux/qml/newsqml/Newsitem.qml | 217 ++++--- source-linux/qml/newsqml/SmileyDialog.qml | 2 +- .../qml/photoqml/ImageUploadDialog.qml | 2 +- source-linux/qml/photoqml/PhotoTab.qml | 537 ++++++++-------- source-linux/translations/friendiqa-de.qm | Bin 17002 -> 17011 bytes source-linux/translations/friendiqa-de.ts | 33 +- source-linux/translations/friendiqa-es.qm | Bin 16934 -> 16923 bytes source-linux/translations/friendiqa-es.ts | 217 ++++--- source-linux/translations/friendiqa-hu.qm | Bin 16803 -> 16776 bytes source-linux/translations/friendiqa-hu.ts | 229 ++++--- source-linux/translations/friendiqa-it.qm | Bin 16838 -> 16867 bytes source-linux/translations/friendiqa-it.ts | 217 ++++--- 57 files changed, 2218 insertions(+), 2252 deletions(-) create mode 100644 source-linux/images/Friendiqa.ico rename source-linux/images/{de.ma-nic.Friendiqa.desktop => de.manic.Friendiqa.desktop} (86%) rename source-linux/images/{Friendiqa.svg => de.manic.Friendiqa.svg} (100%) delete mode 100644 source-linux/qml/configqml/RegisterPage.qml delete mode 100644 source-linux/qml/contactqml/ContactDetailsComponent.qml create mode 100644 source-linux/qml/contactqml/ContactsSearchPage.qml delete mode 100644 source-linux/qml/newsqml/NewsYplayer.qml diff --git a/CHANGELOG.md b/CHANGELOG.md index f390b9f..d4ca060 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,16 @@ +## v0.6.4 + +* Search for new contacts (hashtags, names) +* Filter contacts +* many new emojis +* Replaced Favorite button with Reply button due to buggy Favourite API +* View newsitem on website (works only in coversation view) +* Rebuild contacts handling due to buggy Contacts API +* Removed permissions for new messages due to buggy Contacts API +* Sync all accounts in background (not only active) + + ## v0.6.3 * Dark theme diff --git a/README.md b/README.md index 9cd1126..d8df39f 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Currently supported: * Search for news * Click on hashtag in newsitem starts search for news with that word * Only first photo attachment in post is shown, click for more images and fullscreen image -* Click on video or youtube video shows video fullscreen +* Click on video shows video fullscreen * For news containing urls ending with mp3, mp4, avi, webm, ogg or to a Peertube instance: media can be played in the app * Open links in external browser * Click on contact photo for contact details and last news @@ -26,11 +26,11 @@ Currently supported: * Click on post text opens conversation * Deletion, Reposting, Answering of Posts * Expand truncated news items -* Liking, disliking, favoriting +* Liking, disliking * Attending for event posts * Update fetches new posts (up to last 50) since last in local DB * More shows older posts from local DB -* Create new Message with images or direct messages, Contact/Group access rights (can be stored), smileys +* Create new Message with images or direct messages,smileys * Send image from Android gallery * Send text or urls from other apps to Friendiqa * Native Android image dialog @@ -48,13 +48,14 @@ Currently supported: * Tabs for own profiles, friends, other contacts and groups * Show profile(s) of user and change profile picture * List of all known contacts with locally downloaded pictures -* Follow or unfoolow contacts +* Follow or unfollow contacts +* Search for new contacts according to topic * Show follow requests; approve, deny, ignore requests * Additional information, last messages and other functionality shown in news tab * Show public and private pictures of contact (screenscraping of contact's website, works only with certain theme) * Show public and private events of contact * Show members of groups -* Open website of contact or connect page (for other contacts) +* Open website of contact * Clean other contacts with no news ToDo: @@ -66,8 +67,8 @@ ToDo: Currently supported: -* Download public own images to local directory -* Upload public picture to album with descriptions, send from gallery +* Download public own images to local directory (API is currently broken) +* Upload public picture to album with descriptions, send from gallery (API is currently broken) * Delete own pictures and albums on client and server * Change name or album of existing picture * Show albums in grid, show images in album in grid and fullscreen diff --git a/source-android/android/AndroidManifest.xml b/source-android/android/AndroidManifest.xml index ad2452f..4e9e9e6 100644 --- a/source-android/android/AndroidManifest.xml +++ b/source-android/android/AndroidManifest.xml @@ -1,6 +1,6 @@ - - + + @@ -22,7 +22,7 @@ android:logo="@drawable/friendiqa"> + android:label="Friendiqa" android:screenOrientation="unspecified" android:launchMode="singleTask" android:taskAffinity=""> diff --git a/source-android/friendiqa.pro b/source-android/friendiqa.pro index 40f7006..24663b3 100644 --- a/source-android/friendiqa.pro +++ b/source-android/friendiqa.pro @@ -13,7 +13,7 @@ TEMPLATE = app TARGET = friendiqa CONFIG += release -QT += qml quick gui widgets androidextras sql webview #webengine +QT += core core-private qml quick gui widgets sql androidextras #webengine webview include(androidnative.pri/androidnative.pri) @@ -64,6 +64,7 @@ HEADERS += \ common/alarm.h DISTFILES += \ + android/gradle.properties \ qml/calendarqml/*.qml \ android/AndroidManifest.xml \ android/gradle/wrapper/gradle-wrapper.jar \ @@ -72,6 +73,7 @@ DISTFILES += \ android/build.gradle \ android/gradle/wrapper/gradle-wrapper.properties \ android/gradlew.bat \ + qml/configqml/ConfigAppearancePage.qml \ translations/*.ts \ translations/*.qm \ qml/*.qml \ @@ -86,3 +88,6 @@ DISTFILES += \ ANDROID_EXTRA_LIBS = $$PWD/android/arm/libcrypto_1_1.so $$PWD/android/arm/libssl_1_1.so $$PWD/android/arm64/libcrypto_1_1.so $$PWD/android/arm64/libssl_1_1.so +#ANDROID_ABIS = arm64-v8a +#android: include(/home/pankraz/git/android_openssl/openssl.pri) +android: include(/home/pankraz/android-sdk/android_openssl/openssl.pri) diff --git a/source-android/qml/friendiqa.qml b/source-android/qml/friendiqa.qml index 3c1421e..2f4aabb 100644 --- a/source-android/qml/friendiqa.qml +++ b/source-android/qml/friendiqa.qml @@ -75,7 +75,7 @@ ApplicationWindow{ function onLoginChanged(login){ if(login==""){rootstackView.push("qrc:/qml/configqml/AccountPage.qml")} - else{//rootstackView.push(rootstack) + else{ if (login.newsViewType!="" || login.newsViewType!=null){newstab.newstabstatus=login.newsViewType;} Newsjs.getCurrentContacts(login,db,function(contacts){ contactlist=contacts})} @@ -117,7 +117,7 @@ ApplicationWindow{ } - function showContact(contact){ //print(JSON.stringify(contact)); + function showContact(contact){ rootstackView.push("qrc:/qml/newsqml/ContactPage.qml",{"contact": contact}) } @@ -182,7 +182,7 @@ ApplicationWindow{ footer:ToolBar{id:roottoolbar background: Rectangle{ anchors.fill: parent - color: Material.backgroundDimColor//"#EEEEEE"//"#F8F8F8" + color: Material.backgroundDimColor } TabBar { @@ -224,18 +224,6 @@ ApplicationWindow{ } } - // states: State { - // name: "fullscreen"; - // PropertyChanges { target: bar; height:0 } - // PropertyChanges { target: rootstack; height:parent.height } - // } - - // transitions: Transition { - // PropertyAnimation { properties: "height"; - // easing.type: Easing.InOutQuad - // duration: 1000 - // } - // } StackView{id:rootstackView width:root.width height: root.height @@ -250,6 +238,7 @@ ApplicationWindow{ property string newstabstatus property var conversation:[] source:(rootstack.currentIndex==0)? "qrc:/qml/newsqml/NewsTab.qml":"" + //onDoubleClicked:{newstypeSignal("refresh")} } Loader{ id: friendstab diff --git a/source-linux/CMakeLists.txt b/source-linux/CMakeLists.txt index 8276e56..880ef34 100644 --- a/source-linux/CMakeLists.txt +++ b/source-linux/CMakeLists.txt @@ -1,9 +1,3 @@ -# TEMPLATE = app -# TARGET = friendiqa -# CONFIG += release -# QT += qml quick gui widgets sql webview dbus webengine - - cmake_minimum_required(VERSION 3.1.0) project(friendiqa VERSION 0.6 LANGUAGES CXX) @@ -19,9 +13,7 @@ if(CMAKE_VERSION VERSION_LESS "3.7.0") set(CMAKE_INCLUDE_CURRENT_DIR ON) endif() -find_package(Qt5 COMPONENTS Widgets Quick Sql DBus WebView REQUIRED) #QuickWidgets - -#Webview Webengine +find_package(Qt5 COMPONENTS Widgets Quick Sql DBus REQUIRED) set(MOC_SOURCES common/uploadableimage.h common/xhr.h @@ -37,7 +29,7 @@ set(SOURCES common/friendiqa.cpp common/remoteauthasyncimageprovider.cpp common/updatenews.cpp common/alarmlinux.cpp) - + include_directories(common) add_executable(friendiqa ${SOURCES} ${MOC_SOURCES} application.qrc) @@ -46,52 +38,8 @@ target_link_libraries(friendiqa Qt::Core) target_link_libraries(friendiqa Qt::Widgets) target_link_libraries(friendiqa Qt::Quick) target_link_libraries(friendiqa Qt::Sql) -target_link_libraries(friendiqa Qt::WebView) target_link_libraries(friendiqa Qt::DBus) -#target_link_libraries(friendiqa Qt::QuickWidgets) -# target_link_libraries(friendiqa Qt::Webengine) -# qt5_use_modules(friendiqa Core Widgets Quick Sql DBus) - -install(TARGETS friendiqa DESTINATION bin) - -#RESOURCES = application.qrc - -# OTHER_FILES += qml/friendiqa.qml \ -# translations/*.ts \ -# qml/*.qml -# qml/newsqml/*.qml -# qml/contactqml/*.qml -# qml/photoqml/*.qml -# qml/configqml/*.qml -# js/*.js - -#TRANSLATIONS += translations/friendiqa-de.ts \ -# translations/friendiqa-es.ts \ -# translations/friendiqa-it.ts -# HEADERS += \ -# common/uploadableimage.h \ -# common/xhr.h \ -# common/filesystem.h \ -# common/remoteauthasyncimageprovider.h \ -# common/updatenews.h \ -# common/alarm.h - -#DISTFILES += \ -# qml/calendarqml/*.qml \ -# translations/*.ts \ -# translations/*.qm \ -# qml/*.qml \ -# qml/newsqml/*.qml \ -# qml/contactqml/*.qml \ -# qml/photoqml/*.qml \ -# qml/configqml/*.qml \ -# js/*.js \ - - -# target.path=/usr/bin -# desktop.path = /usr/share/applications -# desktop.files = images/de.ma-nic.Friendiqa.desktop -# icon.path = /usr/share/icons/hicolor/scalable/apps -# icon.files = images/Friendiqa.svg -# INSTALLS+=target desktop icon +install(TARGETS friendiqa DESTINATION ${CMAKE_INSTALL_BINDIR}) +install(FILES images/de.manic.Friendiqa.desktop DESTINATION share/applications) +install(FILES images/de.manic.Friendiqa.svg DESTINATION share/icons/hicolor/scalable/apps) diff --git a/source-linux/application.qrc b/source-linux/application.qrc index ceaba37..17e10d2 100644 --- a/source-linux/application.qrc +++ b/source-linux/application.qrc @@ -13,7 +13,6 @@ qml/newsqml/NewsVideo.qml qml/newsqml/ContactPage.qml qml/newsqml/NewsVideoLarge.qml - qml/newsqml/NewsYplayer.qml qml/newsqml/SmileyDialog.qml qml/contactqml/FriendsTab.qml qml/contactqml/GroupComponent.qml @@ -35,7 +34,6 @@ qml/calendarqml/CalendarTab.qml qml/calendarqml/CalendarDay.qml qml/calendarqml/EventList.qml - qml/configqml/RegisterPage.qml qml/configqml/AccountPage.qml qml/configqml/SyncConfig.qml qml/configqml/SyncComponent.qml @@ -252,5 +250,7 @@ images/Friendica_monochrome.png qml/configqml/ConfigAppearancePage.qml qml/configqml/ConfigStartPage.qml + qml/contactqml/ContactsSearchPage.qml + images/Friendiqa.ico diff --git a/source-linux/common/filesystem.cpp b/source-linux/common/filesystem.cpp index 5a5a489..e2bdbea 100644 --- a/source-linux/common/filesystem.cpp +++ b/source-linux/common/filesystem.cpp @@ -154,10 +154,8 @@ bool FILESYSTEM::isAutostart() { QFileInfo check_file(QDir::homePath() + "/.config/autostart/friendiqa.desktop"); if (check_file.exists() && check_file.isFile()) { - qDebug()<<"autostart "<setDatabase(); updatenews->login(); + updatenews->setSyncAll(true); updatenews->startsync(); //app.connect (updatenews,SIGNAL(quitapp()),&app,SLOT(quit())); @@ -86,6 +87,7 @@ int main(int argc, char *argv[]) { QQmlApplicationEngine view; //QQuickView view; //view.setResizeMode(QQuickView::SizeRootObjectToView); + app.setWindowIcon(QIcon(":/images/Friendiqa.ico")); QTranslator qtTranslator; qtTranslator.load("friendiqa-" + QLocale::system().name(),":/translations"); app.installTranslator(&qtTranslator); @@ -108,6 +110,7 @@ int main(int argc, char *argv[]) { qmlRegisterType("QSystemTrayIcon", 1, 0, "QSystemTrayIcon"); qRegisterMetaType("ActivationReason"); view.rootContext()->setContextProperty("iconTray", QIcon(":/images/Friendica_monochrome.png")); + view.rootContext()->setContextProperty("iconTrayAvailable", QSystemTrayIcon::isSystemTrayAvailable()); view.load(QUrl("qrc:/qml/friendiqa.qml")); //view.show(); diff --git a/source-linux/common/updatenews.cpp b/source-linux/common/updatenews.cpp index b5fe4cd..64aa4a1 100644 --- a/source-linux/common/updatenews.cpp +++ b/source-linux/common/updatenews.cpp @@ -32,7 +32,7 @@ #include "updatenews.h" #include -#include +//#include #include #include #include @@ -68,6 +68,10 @@ void UPDATENEWS::setUrl(QString url) } } +void UPDATENEWS::setSyncAll(bool syncAll) +{ + m_syncAll=syncAll; +} void UPDATENEWS::setDatabase() { @@ -75,7 +79,6 @@ void UPDATENEWS::setDatabase() QString db_url=qe.offlineStorageDatabaseFilePath("Friendiqa"); m_db = QSqlDatabase::addDatabase("QSQLITE"); m_db.setDatabaseName(QUrl("file://"+db_url+".sqlite").toLocalFile()); - //qDebug() << db_url; if (!m_db.open()) { @@ -86,26 +89,8 @@ void UPDATENEWS::setDatabase() void UPDATENEWS::login() { - QSqlQuery query("SELECT * FROM config WHERE isActive=0",m_db); - while (query.next()) - { - username = query.value(1).toString(); - QByteArray bpassword=query.value(2).toByteArray(); - QString password=QByteArray::fromBase64(bpassword); - m_login=username+":"+password ; - xhr.setLogin(m_login); - m_url=query.value(0).toString(); - xhr.setUrl(m_url); - m_imagedir=query.value(3).toString(); - xhr.setImagedir(m_imagedir); - QString isActive=query.value(7).toString(); - } - //m_updateInterval=query.value(5).toInt(); - QSqlQuery syncquery("SELECT * FROM globaloptions",m_db); - // QSqlQuery delquery("DELETE FROM globaloptions WHERE k='sync_interval'",m_db); - // delquery.exec(); m_updateInterval=0; syncindex=0; synclist.clear(); @@ -132,39 +117,61 @@ void UPDATENEWS::login() if(!(synctimequery3.exec())) {qDebug() << " synctimequery3 " << synctimequery3.lastError();} } + QSqlQuery query("SELECT * FROM config ORDER BY isActive ASC, username ASC",m_db); + query.last(); + usernamelength=query.at()+1; + + if (query.isActive()&&(usernameindex

"+newsitem["friendica_html"].toString(); - query.bindValue(11, friendicaHtml.toUtf8().toBase64());} - else{query.bindValue(11, newsitem["friendica_html"].toString().toUtf8().toBase64());} + //if (newsitem["friendica_title"]!="") { + // QString friendicaHtml="" + newsitem["friendica_title"].toString() +"

"+newsitem["friendica_html"].toString(); + // query.bindValue(11, friendicaHtml.toUtf8().toBase64());} + //else{ + query.bindValue(11, newsitem["friendica_html"].toString().toUtf8().toBase64());//} if (newsitem["statusnet_conversation_id"].isDouble()){ query.bindValue(12, newsitem["statusnet_conversation_id"].toInt()); }else{query.bindValue(12, newsitem["statusnet_conversation_id"].toString());} @@ -351,14 +359,14 @@ void UPDATENEWS::store(QByteArray serverreply,QString apiname) if (apiname == "/api/direct_messages/all"){ query.bindValue(1,"1"); query.bindValue(5,"Friendica"); - query.bindValue(6,newsitem["id"].toString().toInt()); + query.bindValue(6,newsitem["id"].toInt()); if(newsitem["recipient"]["id"]!=QJsonValue::Null){ query.bindValue(7,newsitem["recipient"]["id"].toInt());} query.bindValue(10, newsitem["sender_id"].toInt()); query.bindValue(11, newsitem["text"].toString().toUtf8().toBase64()); if(newsitem["friendica_parent_uri"]!=QJsonValue::Null){ query.bindValue(12,newsitem["friendica_parent_uri"]);} query.bindValue(16, newsitem["sender"]["url"]); } - if (apiname == "/api/friendica/notifications"){ + if (apiname == "/api/friendica/notification"){ query.bindValue(1,"2"); query.bindValue(3,QDateTime::fromString(newsitem["date"].toString(),"yyyy-MM-dd hh:mm:ss").toMSecsSinceEpoch()); query.bindValue(5,"Friendica"); @@ -387,7 +395,7 @@ void UPDATENEWS::store(QByteArray serverreply,QString apiname) alarm.notify("DirectMessage: "+newsitem["sender"]["name"].toString(),newsitem["text"].toString(),2); } } - if (apiname=="/api/friendica/notifications"){ + if (apiname=="/api/friendica/notification"){ if(notifylist.contains("notify_Notifications")){ alarm.notify("Notification: "+newsitem["name"].toString(),newsitem["text"].toString(),3); } @@ -403,7 +411,7 @@ void UPDATENEWS::store(QByteArray serverreply,QString apiname) startImagedownload("contactlist"); } else { - if(m_updateInterval!=0){ + if((m_updateInterval!=0) && m_syncAll){ syncindex+=1; startsync(); } @@ -411,9 +419,12 @@ void UPDATENEWS::store(QByteArray serverreply,QString apiname) } else { qDebug()<< "Friendiqa updatenews error " << serverreply; - emit this->error(m_api,QTextCodec::codecForName("utf-8")->toUnicode(serverreply)); - syncindex+=1; - startsync(); + //emit this->error(m_api,QTextCodec::codecForName("utf-8")->toUnicode(serverreply)); + emit this->error(m_api,QString(serverreply)); + if(m_syncAll){ + syncindex+=1; + startsync(); + } } } @@ -428,10 +439,11 @@ void UPDATENEWS::updateImageLocation(QString downloadtype,QString imageurl, QStr testquery.first(); QSqlQuery query("UPDATE contacts SET profile_image='"+ filename +"' WHERE profile_image_url ='"+imageurl+ "' AND username = '" +username+"'",m_db); if(!(query.exec())) {qDebug()<< "updateImagelocation " << query.lastError();} + //qDebug()<< "index " << index << " " << newcontactnames.length()-1 << " " << m_syncAll; if (index==(newcontactnames.length()-1)){ newcontactnames.clear(); newcontactimagelinks.clear(); - if(m_updateInterval!=0){ + if((m_updateInterval!=0) && m_syncAll){ syncindex+=1; startsync(); } @@ -445,7 +457,7 @@ void UPDATENEWS::updateImageLocation(QString downloadtype,QString imageurl, QStr if (index==(newcontactnames.length()-1)){ newcontactnames.clear(); newcontactimagelinks.clear(); - if(m_updateInterval!=0){ + if((m_updateInterval!=0) && m_syncAll){ syncindex+=1; startsync(); } @@ -537,10 +549,10 @@ void UPDATENEWS::updateContacts(QList contacts){ QSqlQuery testquery("SELECT url FROM contacts WHERE username='"+ username +"' AND url='" + contact["url"].toString() +"'",m_db); if (testquery.first()){ query.prepare("UPDATE contacts SET id=?, name=?, screen_name=?, location=?,imageAge=?," - "profile_image_url=?, description=?, protected=?, followers_count=?," - "friends_count=?, created_at=?, favourites_count=?, utc_offset=?, time_zone=?, statuses_count=?," - "following=?, verified=?, statusnet_blocking=?, notifications=?, statusnet_profile_url=?, cid=?, network=?, timestamp=? " - " WHERE username='"+ username +"' AND url='" + contact["url"].toString() +"'"); + "profile_image_url=?, description=?, protected=?, followers_count=?," + "friends_count=?, created_at=?, favourites_count=?, utc_offset=?, time_zone=?, statuses_count=?," + "following=?, verified=?, statusnet_blocking=?, notifications=?, statusnet_profile_url=?, cid=?, network=?, timestamp=? " + " WHERE username='"+ username +"' AND url='" + contact["url"].toString() +"'"); query.bindValue(0, contact["id"].toInt()); query.bindValue(1, contact["name"].toString().toUtf8().toBase64()); query.bindValue(2, contact["screen_name"]); @@ -573,10 +585,10 @@ void UPDATENEWS::updateContacts(QList contacts){ else{ query.prepare("INSERT INTO contacts (username, id, name, screen_name, location,imageAge," - "profile_image_url, description, profile_image, url, protected, followers_count," - "friends_count, created_at, favourites_count, utc_offset, time_zone, statuses_count," - "following, verified, statusnet_blocking, notifications, statusnet_profile_url, cid, network, isFriend, timestamp)" - "VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); + "profile_image_url, description, profile_image, url, protected, followers_count," + "friends_count, created_at, favourites_count, utc_offset, time_zone, statuses_count," + "following, verified, statusnet_blocking, notifications, statusnet_profile_url, cid, network, isFriend, timestamp)" + "VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); query.bindValue(0,username); query.bindValue(1, contact["id"].toInt()); @@ -628,6 +640,7 @@ void UPDATENEWS::storeFriendrequests(QByteArray serverreply,QString apiname) QSqlQuery imagequery("SELECT avatar FROM friendshiprequests",m_db); QList imageurls; + while (imagequery.next()){ imageurls.append(imagequery.value(0).toString()); } @@ -639,10 +652,10 @@ void UPDATENEWS::storeFriendrequests(QByteArray serverreply,QString apiname) QSqlQuery query(m_db); if (testquery.first()){ query.prepare("UPDATE friendshiprequests SET id=?, usernamef=?, acct=?, display_name=?,locked=?," - "bot=?, discoverable=?, groupf=?, created_at=?," - "note=?, avatar=?, header=?, header_static=?, followers_count=?," - "following_count=?, statuses_count=?, last_status_at=?, emojis=?, fields=? " - " WHERE username='"+ username +"' AND url='" + friendrequestitem["url"].toString() +"'"); + "bot=?, discoverable=?, groupf=?, created_at=?," + "note=?, avatar=?, header=?, header_static=?, followers_count=?," + "following_count=?, statuses_count=?, last_status_at=?, emojis=?, fields=? " + " WHERE username='"+ username +"' AND url='" + friendrequestitem["url"].toString() +"'"); query.bindValue(0, friendrequestitem["id"].toInt()); query.bindValue(1, friendrequestitem["username"]); @@ -667,9 +680,9 @@ void UPDATENEWS::storeFriendrequests(QByteArray serverreply,QString apiname) else{ query.prepare("INSERT INTO friendshiprequests (username, id, usernamef, acct, display_name, locked," - " created_at, followers_count, following_count, statuses_count, note, url, avatar, avatar_static, " - "header, header_static, emojis, moved, fields, bot, groupf, discoverable, last_status_at) " - "VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); + " created_at, followers_count, following_count, statuses_count, note, url, avatar, avatar_static, " + "header, header_static, emojis, moved, fields, bot, groupf, discoverable, last_status_at) " + "VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); query.bindValue(0, username); query.bindValue(1, friendrequestitem["id"].toInt()); query.bindValue(2, friendrequestitem["username"].toString()); @@ -710,13 +723,12 @@ void UPDATENEWS::storeFriendrequests(QByteArray serverreply,QString apiname) newcontactimagelinks.append(friendrequestitem["avatar"].toString()); newcontactnames.append(friendrequestitem["username"].toString()); } - } + if (newcontactimagelinks.length()>0){ - //qDebug() << "start Friendrequests imagedownload"; startImagedownload("friendrequests"); }else{ - if(m_updateInterval!=0){ + if((m_updateInterval!=0) && m_syncAll){ syncindex+=1; startsync(); } @@ -769,7 +781,7 @@ void UPDATENEWS::storeEvents(QByteArray serverreply,QString apiname) alarm.notify("Event: "+ QDateTime::fromMSecsSinceEpoch(eventnotifyquery.value(0).toLongLong()).toString("dd.MM.yyyy hh:mm"),eventnotifyquery.value(1).toString(),1); } } - if(m_updateInterval!=0){ + if((m_updateInterval!=0) && m_syncAll){ syncindex+=1; startsync(); } @@ -795,7 +807,7 @@ void UPDATENEWS::showError(QString data, QString url,QString api, int code ) //qDebug() << "showerror " << api << " data " << data; emit this->error(api,data); if (api!=m_api || xhr.downloadtype()!=""){} else{ - if(m_updateInterval!=0){ + if((m_updateInterval!=0) && m_syncAll){ syncindex+=1; startsync(); } diff --git a/source-linux/common/updatenews.h b/source-linux/common/updatenews.h index 4fe6741..4b2ad9b 100644 --- a/source-linux/common/updatenews.h +++ b/source-linux/common/updatenews.h @@ -61,6 +61,7 @@ signals: public slots: void setUrl(QString url); + void setSyncAll(bool syncAll); void setDatabase(); void login(); void timeline(); @@ -84,7 +85,10 @@ private: QString m_imagedir; QString m_login; QString username; + bool m_syncAll; int syncindex; + int usernameindex; + int usernamelength; QSqlDatabase m_db; QList synclist; QList notifylist; diff --git a/source-linux/common/xhr.cpp b/source-linux/common/xhr.cpp index bd4193e..be669a4 100644 --- a/source-linux/common/xhr.cpp +++ b/source-linux/common/xhr.cpp @@ -32,10 +32,11 @@ #include "xhr.h" #include -#include +//#include #include #include #include +#include #include #include #include "uploadableimage.h" @@ -223,7 +224,7 @@ void XHR::getlist() XHR::setUrl(m_filelist.at(dlindex));} else { XHR::setUrl(m_filelist.at(dlindex));} - qDebug() << "start download" << m_url; + //qDebug() << "start download" << m_url; XHR::download(); } else {dlindex=0;m_downloadtype="";m_contactlist.clear();m_filelist.clear();} } @@ -291,7 +292,6 @@ void XHR::onReplySuccess() void XHR::onRequestFinished() { - qDebug()<<"download requestFinished "; // Save the file here if (buffer.isNull()){qDebug() << "File empty"<error(m_downloadtype,m_url,m_api,1);} else if (m_downloadtype=="picturelist") { @@ -359,5 +359,6 @@ void XHR::onSSLError(const QList &errors) QString XHR::bufferToString() { - return QTextCodec::codecForName("utf-8")->toUnicode(buffer); + //return QTextCodec::codecForName("utf-8")->toUnicode(buffer); + return QString(buffer); } diff --git a/source-linux/common/xhr.h b/source-linux/common/xhr.h index 6cec7ee..a8ddd13 100644 --- a/source-linux/common/xhr.h +++ b/source-linux/common/xhr.h @@ -37,7 +37,7 @@ #include #include #include -#include +//#include class XHR : public QObject { diff --git a/source-linux/images/Friendiqa.ico b/source-linux/images/Friendiqa.ico new file mode 100644 index 0000000000000000000000000000000000000000..e5b516e17beefb7a5c03297112924a2977738bc2 GIT binary patch literal 2086 zcmd_rUr19?90%|_=eD~ovsOq#&iQ0Tl$d5r!-9zYduv9I)e3~1K3Nmp)7oMtJ#4fh z=uID1Vf&Lw8Z@H^jf%w{lAu6(iQe6G-E+U4BQ5536k9#jy?pLD{2spd+;h&oR}d8R ztg92~)g?z(3kGGDt*mcaF3v0TE6rtN zXfm0W)rY#ILRNA6C%K(wGZ8y%*nK|@!>#8q+mc%|NAAlat-u5>J2M6-mlv!DF{sH_T=CVsjy$=;2aUt7JC5N^*J6QK+f3 zI_ZDO-RX~Gd+#WhQmrAC%mdrY8c{0;Zv?=Tn4ILU8C%EA_5;h+>Gd1#CEh+L)c&8h0`8J(jo!J579MJf3J!6Vs*BQ4|+kT2mtKUXm%+7MN9d;X9&h_H>Yn17t zHJ;7|fH`ouMS3-tg0zw=g{;c9GSUGFJx&$>nR_ z+`tE*pTkXSrTS=%Iq!0jOgascUoA7_@#Ka_Mo8e@H#zVbDCMWMQrABL%&^x>J}xeT ze9y1*Wob$FcswMN$vlZfBJ#b7X#Vb_q2lg8p~nu^3{p am^?8)o)3jWEc3A-DCzI>ud)2hvitzu1XqCo literal 0 HcmV?d00001 diff --git a/source-linux/images/de.ma-nic.Friendiqa.desktop b/source-linux/images/de.manic.Friendiqa.desktop similarity index 86% rename from source-linux/images/de.ma-nic.Friendiqa.desktop rename to source-linux/images/de.manic.Friendiqa.desktop index 79aa07d..2a7d480 100644 --- a/source-linux/images/de.ma-nic.Friendiqa.desktop +++ b/source-linux/images/de.manic.Friendiqa.desktop @@ -2,7 +2,7 @@ Version=1.0 Type=Application Exec=friendiqa %u -Icon=Friendiqa.svg +Icon=de.manic.Friendiqa.svg Terminal=false Name=Friendiqa GenericName=Social Media diff --git a/source-linux/images/Friendiqa.svg b/source-linux/images/de.manic.Friendiqa.svg similarity index 100% rename from source-linux/images/Friendiqa.svg rename to source-linux/images/de.manic.Friendiqa.svg diff --git a/source-linux/js/helper.js b/source-linux/js/helper.js index df05f13..b99caef 100644 --- a/source-linux/js/helper.js +++ b/source-linux/js/helper.js @@ -62,11 +62,13 @@ function friendicaPostRequest(login,api,data,method,rootwindow,callback) { try{ if (xhrequest.responseText!=""){ callback(xhrequest.responseText) }else{//print("API:\n" +api+" NO RESPONSE"); - showMessage("Error","API:\n" +api+" NO RESPONSE",rootwindow) + //showMessage("Error","API:\n" +api+" NO RESPONSE",rootwindow) callback(xhrequest.responseText) } } - catch (e){print("API:\n" + api+" "+e+"\n Return:"+xhrequest.responseText);showMessage("Error", "API:\n" + api+" "+e+"\n Return:"+xhrequest.responseText,rootwindow)} + catch (e){ + print("API:\n" + api+" "+e+"\n Return:"+xhrequest.responseText); + showMessage("Error", "API:\n" + api+" "+e+"\n Return:"+xhrequest.responseText,rootwindow)} } } xhrequest.open(method, login.server+api,true,login.username,Qt.atob(login.password)); diff --git a/source-linux/js/news.js b/source-linux/js/news.js index 1c97c63..d908855 100644 --- a/source-linux/js/news.js +++ b/source-linux/js/news.js @@ -34,51 +34,77 @@ .import "qrc:/js/helper.js" as Helperjs function requestFriends(login,database,rootwindow,callback){ -// return array of friends + // return array of friends 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){ - var friends=JSON.parse(obj); - for (var i=0;i0'+filtertext); - var result = tx.executeSql('SELECT * from contacts WHERE username="'+login.username+'" AND isFriend>0'); + var result = tx.executeSql('SELECT * from contacts WHERE username="'+login.username+'" AND isFriend>'+isFriend+' ORDER BY screen_name'); // check for friends var contactlist=[]; for (var i=0;i 0) {// use update result = tx.executeSql('UPDATE hashtags SET tag="'+'", date='+curDate+', ownership=0 where username="'+login.username+'" AND tag="'+Qt.btoa(hashtags[tag])+'"'); } else {// use insert result = tx.executeSql('INSERT INTO hashtags (username,tag,date,statuses,ownership) VALUES (?,?,?,?,?)', [login.username,Qt.btoa(hashtags[tag]),curDate,"[]",0]) @@ -122,20 +148,20 @@ function deleteGroup(login,database,rootwindow,group, callback){ Helperjs.friendicaPostRequest(login,"/api/friendica/group_delete?gid="+group.gid+"&name="+group.groupname,"","POST",rootwindow, function (obj){ var deletereturn=JSON.parse(obj); if(deletereturn.success){ - db.transaction( function(tx) { - var result = tx.executeSql('DELETE from groups where username="'+login.username+'" AND groupname="'+group.name+'"'); // delete group - callback() - }); -}})} + db.transaction( function(tx) { + var result = tx.executeSql('DELETE from groups where username="'+login.username+'" AND groupname="'+group.name+'"'); // delete group + callback() + }); + }})} function getLastNews(login,database,callback){ 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){lastnewsid=0}; - callback(lastnewsid) - }) + 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){lastnewsid=0}; + callback(lastnewsid) + }) } @@ -163,15 +189,15 @@ function getCurrentContacts(login,database,callback){ db.transaction( function(tx) { var result = tx.executeSql('SELECT url from contacts WHERE username="'+login.username+'" AND isFriend=1'); // check for friends for (var i=0;i'+lastDate); - var result2 = tx.executeSql('SELECT url from contacts WHERE username="'+login.username+'" AND isFriend=0 AND imageAge > '+lastDate); - for (var j=0;j'+lastDate); + var result2 = tx.executeSql('SELECT url from contacts WHERE username="'+login.username+'" AND isFriend=0 AND imageAge > '+lastDate); + for (var j=0;j0){ for (var j=0;j0){ + } + if (news[i].hasOwnProperty('friendica_activities') && news[i].friendica_activities.dislike.length>0){ for (var k=0;j

"+news[i].friendica_html;} - else{news[i].statusnet_html=news[i].friendica_html} + //if (news[i].friendica_title!="") {news[i].statusnet_html=""+news[i].friendica_title +"

"+news[i].friendica_html;} + //else{ + news[i].statusnet_html=news[i].friendica_html//} db.transaction( function(tx) { var result = tx.executeSql('SELECT * from news where username="'+login.username+'" AND status_id = "'+news[i].id+'" AND messagetype='+news[i].messagetype); // check for news id @@ -241,20 +268,20 @@ function storeNews(login,database,news,rootwindow){ result = tx.executeSql('UPDATE news SET username="'+login.username+'", messagetype='+news[i].messagetype+', 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].statusnet_html)+'", statusnet_conversation_id="'+news[i].statusnet_conversation_id+'",friendica_activities="'+Qt.btoa(JSON.stringify(friendica_activities))+'",attachments="'+attachments+'",friendica_owner="'+news[i].friendica_author.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,news[i].messagetype,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_author.url])}}) - } + } } function getActivitiesUserData(allcontacts,userUrlArray){//print(JSON.stringify(userUrlArray)); var helpArray=[]; for (var i=0;i0){conversationfilter="AND statusnet_conversation_id NOT IN ("+currentconversations.toString()+") "} - for(var j = 0; j< conversations.length; j++) { - var newsrs=tx.executeSql('select * from news WHERE username="'+login.username+'" AND statusnet_conversation_id="'+conversations[j] +'" AND messagetype="'+messagetype+'" ORDER BY created_at ASC'); - //print(JSON.stringify(newsrs.rows.item(0))+JSON.stringify(newsrs.rows.item(1))) - var helpernews=newsrs.rows.item(0); - helpernews=cleanhelpernews(database,login.username,helpernews,allcontacts) - helpernews.currentconversation=[]; - for (var h = 0;h0){ - var helpernews=newsrs.rows.item(0); - var helpernews=cleanhelpernews(database,user,helpernews,allcontacts) - helpernews.currentconversation=[]; - for (var h = 0;h0){ + //helpernews=newsrs.rows.item(0); + //helpernews=cleanhelpernews(database,user,helpernews,allcontacts) + //helpernews.currentconversation=[]; + for (var h = 0;h-1){attachhelper.url=newsitemobject.statusnet_html.substring(newsitemobject.statusnet_html.lastIndexOf("http",helperstringposition),helperstringposition+attachhelperstring.length); -// if (attachArray[image].mimetype=="image/jpeg"){attachhelper.url=attachhelper.url+".jpg"} -// else if (attachArray[image].mimetype=="image/gif"){attachhelper.url=attachhelper.url+".gif"} -// else if (attachArray[image].mimetype=="image/png"){attachhelper.url=attachhelper.url+".png"} -// } -// else { + var attachArray=newsitemobject.attachments; + for (var image in attachArray){ + var attachhelper={mimetype:attachArray[image].mimetype} + var attachhelperstring="-1){var removeme=newsitemobject.statusnet_html.substring(helperstringposition,newsitemobject.statusnet_html.indexOf('">',helperstringposition)+2);} - //print("Attachhelper "+attachhelper.url) - newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(removeme,"") - //newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(attachhelper.url.substring(0,attachhelper.url.length-4)+".jpeg","") - //newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(attachhelper.url.substring(0,attachhelper.url.length-4),"") - - imageAttachmentList.push(attachhelper) + if (helperstringposition>-1){var removeme=newsitemobject.statusnet_html.substring(helperstringposition,newsitemobject.statusnet_html.indexOf('">',helperstringposition)+2);} + newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(removeme,"") + imageAttachmentList.push(attachhelper) + } } - } }catch(e){print("attachment "+e)} + newsitemobject.statusnet_html=newsitemobject.statusnet_html.replace(/class=\"attachment-image\"/g,"width=\"600\" "); + for (var format in videoformats){ if (newsitemobject.text.indexOf("."+videoformats[format])>-1){ - var videohelper={mimetype:"video/"+videoformats[format]} - var videotext=newsitemobject.text; - while (videotext.indexOf("."+videoformats[format])>-1){ - var videohelperstringposition=videotext.indexOf("."+videoformats[format]); - videohelper.url=videotext.substring(videotext.lastIndexOf("http",videohelperstringposition),videohelperstringposition+4); - videotext=videotext.substring(videohelperstringposition+4,videotext.length) - if ((videoAttachmentList.length==0) || (videoAttachmentList[videoAttachmentList.length-1].url!=videohelper.url)){videoAttachmentList.push(videohelper)} - } - } + var videohelper={mimetype:"video/"+videoformats[format]} + var videotext=newsitemobject.text; + while (videotext.indexOf("."+videoformats[format])>-1){ + var videohelperstringposition=videotext.indexOf("."+videoformats[format]); + videohelper.url=videotext.substring(videotext.lastIndexOf("http",videohelperstringposition),videohelperstringposition+4); + videotext=videotext.substring(videohelperstringposition+4,videotext.length) + if ((videoAttachmentList.length==0) || (videoAttachmentList[videoAttachmentList.length-1].url!=videohelper.url)){videoAttachmentList.push(videohelper)} + } + } } if (newsitemobject.text.indexOf("/videos/watch/")>-1){ - var ptvideohelper={mimetype:"video/mp4"} - var ptvideotext=newsitemobject.text; - while (ptvideotext.indexOf("/videos/watch/")>-1){ - var ptvideohelperstringposition=ptvideotext.indexOf("/videos/watch/"); - var ptposend=findend(ptvideotext,ptvideohelperstringposition); - if(ptposend==-1){ptposend=ptvideotext.length}; - ptvideohelper.url=ptvideotext.substring(ptvideotext.lastIndexOf("http",ptvideohelperstringposition),ptposend)+"-480.mp4"; - ptvideohelper.url=ptvideohelper.url.replace("/videos/watch","/static/webseed"); - ptvideotext=ptvideotext.substring(ptposend,ptvideotext.length) - if ((videoAttachmentList.length==0) || (videoAttachmentList[videoAttachmentList.length-1].url!=ptvideohelper.url)){videoAttachmentList.push(ptvideohelper)} - } - } - if (newsitemobject.text.indexOf("youtube.com/watch?v")>-1){ - var yttext=newsitemobject.text; - while (yttext.indexOf("youtube.com/watch?v")>-1){ - var ythelperstringposition=yttext.indexOf("watch?v="); - var ytposend=findend(yttext,ythelperstringposition); - var ythelper={mimetype:"video/youtube"} - ythelper.url=yttext.substring(ythelperstringposition+8,ytposend); - yttext=yttext.substring(ytposend,yttext.length); - if ((videoAttachmentList.length==0) || (videoAttachmentList[videoAttachmentList.length-1].url!=ythelper.url)){videoAttachmentList.push(ythelper)} - } + var ptvideohelper={mimetype:"video/mp4"} + var ptvideotext=newsitemobject.text; + while (ptvideotext.indexOf("/videos/watch/")>-1){ + var ptvideohelperstringposition=ptvideotext.indexOf("/videos/watch/"); + var ptposend=findend(ptvideotext,ptvideohelperstringposition); + if(ptposend==-1){ptposend=ptvideotext.length}; + ptvideohelper.url=ptvideotext.substring(ptvideotext.lastIndexOf("http",ptvideohelperstringposition),ptposend)+"-480.mp4"; + ptvideohelper.url=ptvideohelper.url.replace("/videos/watch","/static/webseed"); + ptvideotext=ptvideotext.substring(ptposend,ptvideotext.length) + if ((videoAttachmentList.length==0) || (videoAttachmentList[videoAttachmentList.length-1].url!=ptvideohelper.url)){videoAttachmentList.push(ptvideohelper)} + } } + newsitemobject.videoAttachmentList=videoAttachmentList; newsitemobject.imageAttachmentList=imageAttachmentList; if ((msg.options.hasOwnProperty("hide_nsfw"))&&(msg.options.hide_nsfw==1)&&(newsitemobject.text.indexOf("#nsfw")>-1)){ @@ -132,48 +113,42 @@ function beautify(newsitemobject,msg){ return newsitemobject; } - - WorkerScript.onMessage = function(msg) { -if(msg.deleteId!==undefined) + if(msg.deleteId!==undefined) {msg.model.remove(msg.deleteId); - msg.model.sync() -} -else{ - if(msg.method=="refresh" || msg.method=="contact" ||(msg.method=="conversation"&&msg.news.length>0)){msg.model.clear()}; - msg.model.sync() - - //for (var j=0;j0)){ - newsitemobject.lastcomment=beautify(newsitemobject.currentconversation[newsitemobject.currentconversation.length-1],msg); - newsitemobject.lastcomment.indent=1 - } - - if (msg.method=="conversation"){ - if (j==0){newsitemobject.indent=0}else{ - for (var k=msg.model.count-1;k>-1;k--){ - if (newsitemobject.in_reply_to_status_id==msg.model.get(k).newsitemobject.id){ - newsitemobject.indent=(msg.model.get(k).newsitemobject.indent||0)+1; - if (newsitemobject.indent>6){newsitemobject.indent=6}; - } - } - }} - data=({"newsitemobject": newsitemobject}) - } - if(msg.method=="append") { - msg.model.insert(j, data)} - else{ - msg.model.append(data) - } - } - - //if (j==msg.news.length){ msg.model.sync() - //} -} + } + else{ + if(msg.method=="refresh" || msg.method=="contact" ||(msg.method=="conversation"&&msg.news.length>0)){msg.model.clear()}; + msg.model.sync() + for (var j in msg.news){ + let data=({}); + if (typeof(msg.news[j])=='object') { + var newsitemobject=msg.news[j]; + newsitemobject=beautify(newsitemobject,msg); + if (!(typeof(newsitemobject.currentconversation)=='undefined') && (newsitemobject.currentconversation.length>0)){ + newsitemobject.lastcomment=beautify(newsitemobject.currentconversation[newsitemobject.currentconversation.length-1],msg); + newsitemobject.lastcomment.indent=1 + newsitemobject.lastcomment.isLastComment=true + } + + if (msg.method=="conversation"){ + if (j==0){newsitemobject.indent=0}else{ + for (var k=msg.model.count-1;k>-1;k--){ + if (newsitemobject.in_reply_to_status_id==msg.model.get(k).newsitemobject.id){ + newsitemobject.indent=(msg.model.get(k).newsitemobject.indent||0)+1; + if (newsitemobject.indent>6){newsitemobject.indent=6}; + } + } + }} + data=({"newsitemobject": newsitemobject}) + } + if(msg.method=="append") { + msg.model.insert(j, data)} + else{ + msg.model.append(data) + } + } + msg.model.sync() + } } diff --git a/source-linux/js/service.js b/source-linux/js/service.js index 544db02..28798a8 100644 --- a/source-linux/js/service.js +++ b/source-linux/js/service.js @@ -45,7 +45,7 @@ function initDatabase(database) { // initialize the database object tx.executeSql('CREATE TABLE IF NOT EXISTS config(server TEXT, username TEXT, password TEXT, imagestore TEXT, maxnews INT, timerInterval INT, newsViewType TEXT,isActive INT, permissions TEXT,maxContactAge INT,APIVersion TEXT,layout TEXT, addons TEXT)'); tx.executeSql('CREATE TABLE IF NOT EXISTS news(username TEXT, messagetype INT, text TEXT, created_at INT, in_reply_to_status_id INT, source TEXT, status_id INT, in_reply_to_user_id INT, geo TEXT,favorited TEXT, uid INT, statusnet_html TEXT, statusnet_conversation_id TEXT,friendica_activities TEXT, friendica_activities_self TEXT, attachments TEXT, friendica_owner TEXT)'); tx.executeSql('CREATE TABLE IF NOT EXISTS contacts(username TEXT, id INT, name TEXT, screen_name TEXT, location TEXT,imageAge INT, profile_image_url TEXT, description TEXT, profile_image BLOB, url TEXT, protected TEXT, followers_count INT, friends_count INT, created_at INT, favourites_count TEXT, utc_offset TEXT, time_zone TEXT, statuses_count INT, following TEXT, verified TEXT, statusnet_blocking TEXT, notifications TEXT, statusnet_profile_url TEXT, cid INT, network TEXT, isFriend INT, timestamp INT)'); -// tx.executeSql('CREATE INDEX IF NOT EXISTS contact_id ON contacts(id)'); + // tx.executeSql('CREATE INDEX IF NOT EXISTS contact_id ON contacts(id)'); tx.executeSql('CREATE TABLE IF NOT EXISTS profiles(username TEXT, id INT, profiledata TEXT)'); tx.executeSql('CREATE TABLE IF NOT EXISTS groups(username TEXT, groupname TEXT, gid INT, members TEXT)'); tx.executeSql('CREATE TABLE IF NOT EXISTS events(username TEXT, id INT, start INT, end INT, allday INT, title TEXT, j INT, d TEXT, isFirst INT, uid INT, cid INT, uri TEXT, created INT, edited INT, desc TEXT, location TEXT, type TEXT, nofinish TEXT, adjust INT, ignore INT, permissions TEXT, guid INT, itemid INT, plink TEXT, authorName TEXT, authorAvatar TEXT, authorLink TEXT, html TEXT)'); @@ -59,99 +59,99 @@ function initDatabase(database) { // initialize the database object function cleanPermissions(oldperms){ var newperms=oldperms.replace("<","");newperms=newperms.replace(">","");newperms="["+newperms+"]"; var newpermArray=JSON.parse(newperms); -return (newpermArray) + return (newpermArray) } function getEvents(database,login,rootwindow,callback){ -var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]); + var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]); Helperjs.friendicaWebRequest(login.server+"/cal/"+login.username+"/json",rootwindow,function(obj){ - //Helperjs.friendicaRemoteAuthRequest(login,login.server+"/cal/"+login.username+"/json",login.server+"/profile/"+login.username,rootwindow,function(obj){ - var events = JSON.parse(obj); - db.transaction( function(tx) { - for (var i=0;istartday){ - for (var j=startday+1;jstartday){ + for (var j=startday+1;j0){ - for(var i = 0; i < rs.rows.length; i++) { - rsArray.push(rs.rows.item(i)) - } - var rsObject={server:rsArray[0].server,username:rsArray[0].username, password:rsArray[0].password,imagestore:rsArray[0].imagestore,isActive:rsArray[0].isActive, newsViewType:rsArray[0].newsViewType,permissions:JSON.parse(rsArray[0].permissions),maxContactAge:rsArray[0].maxContactAge,APIVersion:rsArray[0].APIVersion,addons:rsArray[0].addons}; - if (rsObject.newsViewType!="" && rsObject.newsViewType!=null){updateNewsviewtype(database,rsObject.newsViewType)} - } else {var rsObject=""} - callback(rsObject)}} + var rs = tx.executeSql('select * from config'+where); + var rsArray=[]; + if (rs.rows.length>0){ + for(var i = 0; i < rs.rows.length; i++) { + rsArray.push(rs.rows.item(i)) + } + var rsObject={server:rsArray[0].server,username:rsArray[0].username, password:rsArray[0].password,imagestore:rsArray[0].imagestore,isActive:rsArray[0].isActive, newsViewType:rsArray[0].newsViewType,accountId:rsArray[0].maxnews,permissions:JSON.parse(rsArray[0].permissions),maxContactAge:rsArray[0].maxContactAge,APIVersion:rsArray[0].APIVersion,addons:rsArray[0].addons}; + if (rsObject.newsViewType!="" && rsObject.newsViewType!=null &&!typeof(rsObject.newsViewType)=='undefined'){updateNewsviewtype(database,rsObject.newsViewType)} + } else {var rsObject=""} + callback(rsObject)}} ) } @@ -315,9 +314,9 @@ function readAllLogins(database,callback) { // reads config } function readActiveConfig(database){ - var obj=""; - readConfig(database,function(config){obj=config},"isActive", 0); - return obj; + var obj=""; + readConfig(database,function(config){obj=config},"isActive", 0); + return obj; } function setDefaultOptions(database){ @@ -332,7 +331,7 @@ function readGlobaloptions(database,callback){ var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]); var go=({}); db.transaction( function(tx) { - var rs = tx.executeSql('select * from globaloptions'); + var rs = tx.executeSql('select * from globaloptions'); for (var r=0; r 0) {// use update result = tx.executeSql('UPDATE globaloptions SET v="'+value+'" WHERE k="'+key+'"') } else {// use insert - result = tx.executeSql('INSERT INTO globaloptions (k,v) VALUES (?,?)', [key,value]) + result = tx.executeSql('INSERT INTO globaloptions (k,v) VALUES (?,?)', [key,value]) } }) root.globaloptions[key]=value; - } +} function deleteConfig(database,userobj,callback) { // delete user data from DB if (userobj){var where = " WHERE username='"+ userobj.username+"' and server='"+userobj.server+"'";} else { return "no user selected!";} @@ -370,7 +369,7 @@ function deleteConfig(database,userobj,callback) { // delete user data from DB var rs4 = tx.executeSql("delete from imageData WHERE username='"+ userobj.username+"'"); var rs5 = tx.executeSql("delete from groups WHERE username='"+ userobj.username+"'"); var rs5 = tx.executeSql("delete from events WHERE username='"+ userobj.username+"'"); - callback(); + callback(); }) } @@ -386,33 +385,31 @@ function updateNewsviewtype(database, newsViewtype){ function cleanNews(database,callback){ - var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]); - db.transaction( function(tx) { - var maxnewsrs = tx.executeSql("SELECT v FROM globaloptions WHERE k='max_news'"); - var maxnews=1000; if(maxnewsrs.rows.length>0){ maxnews=maxnewsrs.rows.item(0).v}; - for (var i=0; i<6;i++){ - if (i!=0){var maxnewsa=maxnews/5}else{maxnewsa=maxnews} - var newscountrs = tx.executeSql('SELECT COUNT(*) from news WHERE messagetype='+i); - var newscount = 0; - if (newscountrs.rows.length>0){newscount=newscountrs.rows.item(0)["COUNT(*)"]};//print(i+" "+maxnewsa+" newscount "+newscount) - if (newscount>maxnewsa){ - var lastvalidtimers= tx.executeSql('SELECT DISTINCT created_at FROM news WHERE messagetype='+i+' ORDER BY created_at ASC LIMIT ' +(newscount-maxnewsa)); - var lastvalidtime=lastvalidtimers.rows.item(newscount-maxnewsa-1).created_at; - var deleters = tx.executeSql('DELETE from news WHERE messagetype='+i+' AND created_at<='+lastvalidtime)} - } - callback() - }) - } + var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]); + db.transaction( function(tx) { + var maxnewsrs = tx.executeSql("SELECT v FROM globaloptions WHERE k='max_news'"); + var maxnews=1000; if(maxnewsrs.rows.length>0){ maxnews=maxnewsrs.rows.item(0).v}; + for (var i=0; i<6;i++){ + if (i!=0){var maxnewsa=maxnews/5}else{maxnewsa=maxnews} + var newscountrs = tx.executeSql('SELECT COUNT(*) from news WHERE messagetype='+i); + var newscount = 0; + if (newscountrs.rows.length>0){newscount=newscountrs.rows.item(0)["COUNT(*)"]}; + if (newscount>maxnewsa){ + var lastvalidtimers= tx.executeSql('SELECT DISTINCT created_at FROM news WHERE messagetype='+i+' ORDER BY created_at ASC LIMIT ' +(newscount-maxnewsa)); + var lastvalidtime=lastvalidtimers.rows.item(newscount-maxnewsa-1).created_at; + var deleters = tx.executeSql('DELETE from news WHERE messagetype='+i+' AND created_at<='+lastvalidtime)} + } + callback() + }) +} function cleanContacts(login,database,callback){ var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]); db.transaction( function(tx) { var oldestnewsrs= tx.executeSql('SELECT created_at FROM news WHERE username="'+login.username+'" AND messagetype=0 ORDER BY created_at ASC LIMIT 1'); 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;i0){tagcount=tagcountrs.rows.item(0)["COUNT(*)"]}; - if (tagcount>50){ - var lastvaliddaters= tx.executeSql('SELECT DISTINCT date FROM hashtags ORDER BY date ASC LIMIT ' +(tagcount-50)); - var lastvaliddate=lastvaliddaters.rows.item(tagcount-49).date; - var deleters = tx.executeSql('DELETE from hashtags WHERE date<='+lastvaliddate)} - callback() - }) - } + var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]); + db.transaction( function(tx) { + var tagcountrs = tx.executeSql('SELECT COUNT(*) from hashtags'); + var tagcount = 0; + if (tagcountrs.rows.length>0){tagcount=tagcountrs.rows.item(0)["COUNT(*)"]}; + if (tagcount>50){ + var lastvaliddaters= tx.executeSql('SELECT DISTINCT date FROM hashtags ORDER BY date ASC LIMIT ' +(tagcount-50)); + var lastvaliddate=lastvaliddaters.rows.item(tagcount-49).date; + var deleters = tx.executeSql('DELETE from hashtags WHERE date<='+lastvaliddate)} + callback() + }) +} function updateContactInDB(login,database,isFriend,contact){// for newstab and friendstab var currentTime=Date.now(); var image_timestamp=0; - var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]); - db.transaction( function(tx) { - var imagename_helper=[]; - imagename_helper=contact.profile_image_url.split('?');//print("substring: "+JSON.stringify(imagename_helper)+imagename_helper[0].substring(imagename_helper[0].lastIndexOf("/")+1, imagename_helper[0].length)) - try {parseInt(image_timestamp=imagename_helper[1].substring(imagename_helper[1].indexOf("ts=")+3,imagename_helper[1].length))} catch(e){}; + var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]); + db.transaction( function(tx) { + var imagename_helper=[]; + imagename_helper=contact.profile_image_url.split('?'); + try {parseInt(image_timestamp=imagename_helper[1].substring(imagename_helper[1].indexOf("ts=")+3,imagename_helper[1].length))} catch(e){}; 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="'+ 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,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){newsBusy.running=false;}; + try{var newslist=JSON.parse(data)} catch(e){print("processnews "+e+ " api "+ api + " data "+data);newsBusy.running=false;}; if (api=="/api/users/show"){ var usermessages=[]; usermessages.push(newslist.status); newslist=usermessages; } - if (data==""){} + if (data==""){newsBusy.running=false} else if (typeof(newslist)=='undefined'){ - Helperjs.showMessage(qsTr("Undefined Array Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root) - } + Helperjs.showMessage(qsTr("Undefined Array Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root) + } else if (newslist.hasOwnProperty('status')){ Helperjs.showMessage(qsTr("JSON status 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" || api=="/api/direct_messages/conversation"){ + + if (!(Array.isArray(newslist)) && (typeof(newslist)==='object')){//answers return object, not array + newslist=[];newslist.push(JSON.parse(data)); + } + + if (api=="/api/direct_messages/all" || api=="/api/direct_messages/conversation" ||api=="/api/direct_messages/new"){ for (var n in newslist){ - newslist[n].created_at=Date.parse(Newsjs.cleanDate(newslist[n].created_at)); + try{newslist[n].created_at=Date.parse(Newsjs.cleanDate(newslist[n].created_at));}catch(e){ + newslist[n].created_at=Date.parse(newslist[n].created_at) + } newslist[n].messagetype=1; newslist[n].source=" Friendica"; newslist[n].status_id=newslist[n].id; @@ -486,7 +488,7 @@ function processNews(api,data){ newslist[n].in_reply_to_user_id=newslist[n].recipient_id if(newslist[n].in_reply_to_user_id){newslist[n].reply_user=Newsjs.objFromArray(allcontacts,"id",newslist[n].in_reply_to_user_id)} }} - else if (api=="/api/friendica/notifications"){ + else if (api=="/api/friendica/notification"){ for (var n in newslist){ newslist[n].created_at=Date.parse(newslist[n].date); newslist[n].messagetype=2; @@ -502,38 +504,42 @@ function processNews(api,data){ } } - else {//if(api!="/api/statuses/user_timeline"){ var chatlist=[]; + var chatlistclean=[]; var conversationIds=[]; var commentCount=[]; for (var n in newslist){ if (newslist[n]!=null){ newslist[n].created_at=Date.parse(Newsjs.cleanDate(newslist[n].created_at)); + newslist[n].messagetype=5; + newslist[n].status_id=newslist[n].id; if (api=="/api/statuses/replies"){newslist[n].messagetype=3}else{newslist[n].messagetype=0;} newslist[n].friendica_author=cleanUser(newslist[n].friendica_author); newslist[n].user=cleanUser(newslist[n].user); - if (newslist[n].friendica_title!="") {newslist[n].statusnet_html=""+newslist[n].friendica_title +"

"+newslist[n].friendica_html;} - else{newslist[n].statusnet_html=newslist[n].friendica_html} + //if (newslist[n].friendica_title!="") {newslist[n].statusnet_html=""+newslist[n].friendica_title +"

"+newslist[n].friendica_html;} + //else{ //friendica_title also included in html + newslist[n].statusnet_html=newslist[n].friendica_html + //} if(newslist[n].in_reply_to_user_id){newslist[n].reply_user=Newsjs.objFromArray(allcontacts,"id",newslist[n].in_reply_to_user_id)} if(newslist[n].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]); - } + 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]); - } + 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]); - } + 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]); - } + 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]); - } + newslist[n].friendica_activities.attendmaybe[r]=cleanUser(newslist[n].friendica_activities.attendmaybe[r]); + } } if(!(newslist[n].hasOwnProperty('friendica_author'))){ newslist[n].friendica_author=newslist[n].user @@ -542,29 +548,50 @@ function processNews(api,data){ //fill chatlist if (conversationindex==-1){ - chatlist.push(newslist[n]); + let conversation=[];conversation.push(newslist[n]); + let firstmessage={currentconversation:conversation}; + chatlist.push(firstmessage); conversationIds.push(newslist[n].statusnet_conversation_id); commentCount.push(1); } else{ commentCount[conversationindex]=commentCount[conversationindex]+1; - chatlist[conversationindex]=newslist[n]; + chatlist[conversationindex].currentconversation.push(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)} + if ((newstab.newstabstatus=="Conversations")&&!(api=="/api/conversation/show"|| api=="/api/direct_messages/conversation")){ + //enrich chatlist with old entries + for (var count in chatlist){ + chatlist[count].currentconversation.reverse(); + if (chatlist[count].currentconversation[0].id_str!==chatlist[count].currentconversation[0].statusnet_conversation_id){ + try{ + Newsjs.oldchatfromdb(db,login.username,chatlist[count].currentconversation[0].statusnet_conversation_id,chatlist[count].currentconversation[0].id,allcontacts,function(oldpost,oldcount){ + let completeChat=oldpost.currentconversation.concat(chatlist[count].currentconversation); + let newChat=completeChat[0]; + newChat.currentconversation=[]; + for (let c in completeChat){ + if (completeChat[c].status_id!=newChat.status_id){ + newChat["currentconversation"].push(completeChat[c]) + } + } + newChat.newscount=oldcount+commentCount[count]; + chatlistclean.push(newChat); + }) + }catch(e){print(e)} + } + else{ + let newChat=chatlist[count].currentconversation[0]; + newChat["currentconversation"]=[]; + for (let c in chatlist[count].currentconversation){ + if (chatlist[count].currentconversation[c].status_id!=newChat.status_id){ + newChat["currentconversation"].push(chatlist[count].currentconversation[c]) + } + } + newChat.newscount=commentCount[count]; + chatlistclean.push(newChat); + } } - else{chatlist[count].newscount=commentCount[count]} } } @@ -575,8 +602,8 @@ function processNews(api,data){ else if (api=="/api/statuses/user_timeline" || api=="/api/users/show"){ root.contactposts=newslist } - else if ((api!="/api/direct_messages/all")&&(api!="/api/friendica/notifications")&&(newstab.newstabstatus==="Conversations")){ - showNews(chatlist);root.news=newslist + else if ((api!="/api/direct_messages/all")&&(api!="/api/friendica/notification")&&(api!="/api/direct_messages/new")&&(newstab.newstabstatus==="Conversations")){ + showNews(chatlistclean);root.news=newslist } else { showNews(newslist);root.news=newslist @@ -585,7 +612,6 @@ function processNews(api,data){ var newstabarray=["Conversations","Favorites","Timeline","DirectMessage","Replies"]; if (newstabarray.indexOf(newstab.newstabstatus)>-1){contacttimer.start()} } - } @@ -603,70 +629,70 @@ function updateView(viewtype){ //newsBusy.running=true; //downloadNotice.text="xhr start "+Date.now() switch(viewtype){ - case "Conversations": - Newsjs.getLastNews(login,db,function(lastnews){ - 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,function(lastnews){ - 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": + case "Conversations": + Newsjs.getLastNews(login,db,function(lastnews){ 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.setApi("/api/statuses/friends_timeline"); xhr.clearParams(); - break; - case "Direct Messages": + xhr.setParam("since_id",lastnews); + xhr.setParam("count",50)}); + break; + case "Timeline": + var lastnews=Newsjs.getLastNews(login,db,function(lastnews){ xhr.setLogin(login.username+":"+Qt.atob(login.password)); xhr.setUrl(login.server); - xhr.setApi("/api/direct_messages/all"); + xhr.setApi("/api/statuses/friends_timeline"); xhr.clearParams(); - break; - case "Public Timeline": + 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/notification"); + 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; + case "Replies": + xhr.setLogin(login.username+":"+Qt.atob(login.password)); + xhr.setUrl(login.server); + xhr.setApi("/api/statuses/replies"); + xhr.clearParams(); + break; + default: + Newsjs.getLastNews(login,db,function(lastnews){ xhr.setLogin(login.username+":"+Qt.atob(login.password)); xhr.setUrl(login.server); - xhr.setApi("/api/statuses/public_timeline"); + xhr.setApi("/api/statuses/friends_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; - case "Replies": - xhr.setLogin(login.username+":"+Qt.atob(login.password)); - xhr.setUrl(login.server); - xhr.setApi("/api/statuses/replies"); - xhr.clearParams(); - break; - default: - Newsjs.getLastNews(login,db,function(lastnews){ - 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.setParam("since_id",lastnews); + xhr.setParam("count",50) + newstab.newstabstatus="Conversations"; + }); } xhr.get(); @@ -682,12 +708,12 @@ function updateView(viewtype){ function showGroups(){ Helperjs.readData(db,"groups",login.username,function(groups){ var groupitems=""; - for (var i=0;iFriendiqa v0.6.3
Licensed under GPL 3 with the exception of OpenSSL
"+ + text: "Friendiqa v0.6.4
Licensed under GPL 3 with the exception of OpenSSL
"+ "Website https://friendiqa.ma-nic.de
"+ "Sourcecode: https://git.friendi.ca/LubuWest/Friendiqa
"+ "Privacy Policy: http://git.friendi.ca/lubuwest/Friendiqa/src/branch/master/PrivacyPolicy.md
"+ diff --git a/source-linux/qml/configqml/RegisterPage.qml b/source-linux/qml/configqml/RegisterPage.qml deleted file mode 100644 index 87a27cd..0000000 --- a/source-linux/qml/configqml/RegisterPage.qml +++ /dev/null @@ -1,57 +0,0 @@ -// This file is part of Friendiqa -// https://git.friendi.ca/lubuwest/Friendiqa -// Copyright (C) 2020 Marco R. -// -// 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 . - -import QtQuick 2.9 -import QtQuick.Controls 2.12 -import QtWebView 1.1 -import "qrc:/qml/genericqml" - -Rectangle{ - color:"white" - property alias url:htmlview.url - - WebView {id:htmlview; - height:parent.height-7*mm - width:parent.width - y:7*mm - } - Button{ - id:closeButton - height: 3*root.fontFactor*osSettings.bigFontSize - anchors.top: parent.top - anchors.topMargin: 1*mm - anchors.right: parent.right - anchors.rightMargin: 1*mm - text: "\uf057" - font.pointSize: osSettings.bigFontSize - onClicked:{root.pop()} - } -} diff --git a/source-linux/qml/contactqml/ContactDetailsComponent.qml b/source-linux/qml/contactqml/ContactDetailsComponent.qml deleted file mode 100644 index 768a653..0000000 --- a/source-linux/qml/contactqml/ContactDetailsComponent.qml +++ /dev/null @@ -1,177 +0,0 @@ -// This file is part of Friendiqa -// https://git.friendi.ca/lubuwest/Friendiqa -// Copyright (C) 2020 Marco R. -// -// 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 . - -import QtQuick 2.0 -import QtQuick.Controls 2.12 -import "qrc:/qml/genericqml" - -Item { -id: contactLargeComponent -x:mm -y:mm -property var contact:({}) -property var createdAtDate: new Date(contact.created_at) -property string connectUrl: (contact.network!=="dfrn")||(contact.isFriend!=0)?"":( ""+qsTr("Connect")+"
") - -Rectangle { - id: wrapper - - width:root.width-2*mm //friendsTabView.width; - height:root.height-20*mm// friendsTabView.height-15*mm - border.color: "grey" - color:"white" - radius: 0.5*mm - Image { - id: photoImage - x:mm - y:mm - width: 15*mm - height:15*mm - source:(contact.profile_image!="")? "file://"+contact.profile_image : contact.profile_image_url - onStatusChanged: if (photoImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"} - } - - Label { - id: namelabel - x: mm - width: root.width-6*mm //friendsTabView.width-4*mm - height: 3*mm - text:contact.name+" (@"+contact.screen_name+")" - elide:Text.ElideRight - anchors.topMargin: 0 - anchors.left: photoImage.left - color: "#303030" - font.pixelSize: 4*mm - anchors.top: photoImage.bottom - } - Rectangle{ - id: detailsrectangle - anchors.top: namelabel.bottom - anchors.topMargin: 2*mm - - ScrollView{ - ScrollBar.horizontal.policy: ScrollBar.AlwaysOff - //frameVisible: true - id:namelabelflickable - width: root.width-10*mm - height:root.height-50*mm - x: mm - clip:true - Text{ - id:namelabeltext - width: namelabelflickable.width - height: implicitHeight - font.pixelSize: 3*mm - textFormat:Text.RichText - wrapMode: Text.Wrap - text:""+qsTr("Description")+": "+contact.description+"
"+qsTr("Location")+": "+contact.location+"
"+qsTr("Posts")+": "+contact.statuses_count+ - "
"+qsTr("URL")+": "+contact.url+"
"+ - connectUrl+ ""+qsTr("Created at")+": "+createdAtDate.toLocaleString(Qt.locale()) - onLinkActivated: { - Qt.openUrlExternally(link)} - } - } - - Row{ - anchors.top: namelabelflickable.bottom - anchors.topMargin: 2*mm - x: mm - spacing:4 - - MButton{ - id:photobutton - height: 6*mm - width: 8*mm - text: "\uf03e" // "Photos" - visible:(contact.network=="dfrn") - onClicked:{ - fotostab.phototabstatus="Contact"; - root.currentIndex=2; - fotostab.active=true; - root.fotoSignal(contact) ; - contactLargeComponent.destroy(); - } - } - - MButton{ - id:messagebutton - height: 6*mm - width: 8*mm - text: "\uf0e6" //"Messages" - onClicked:{ - root.currentIndex=0; - //newstab.active=true; - root.messageSignal(contact) ; - contactLargeComponent.destroy(); - } - } - - MButton{ - id:dmbutton - visible: (contact.following=="true") - height: 6*mm - width: 8*mm - text: "\uf040" //"DM" - onClicked:{ - root.currentIndex=0; - root.directmessageSignal(contact.screen_name); - contactLargeComponent.destroy(); - } - } - - - MButton{ - id:eventbutton - visible:(contact.network=="dfrn") - height: 6*mm - width: 8*mm - text:"\uf073" //Events - onClicked:{ - root.currentIndex=3; - calendartab.active=true; - calendartab.calendartabstatus="Friend" - root.eventSignal(contact); - contactLargeComponent.destroy(); - } - } - - MButton{ - id: closeButton - height: 6*mm - width: 8*mm - text: "\uf057" //"close" - onClicked:{contactLargeComponent.destroy(); - } - } - } - } -} -} diff --git a/source-linux/qml/contactqml/ContactsListTab.qml b/source-linux/qml/contactqml/ContactsListTab.qml index b8f0d2a..5dceccb 100644 --- a/source-linux/qml/contactqml/ContactsListTab.qml +++ b/source-linux/qml/contactqml/ContactsListTab.qml @@ -31,11 +31,12 @@ import QtQuick 2.11 import QtQuick.Controls 2.12 +import QtQuick.Controls.Material 2.12 import QtQuick.Layouts 1.11 import QtQuick.LocalStorage 2.0 import "qrc:/js/helper.js" as Helperjs -//import "qrc:/js/news.js" as Newsjs import "qrc:/js/service.js" as Service +import "qrc:/js/news.js" as Newsjs import "qrc:/qml/contactqml" import "qrc:/qml/genericqml" @@ -44,14 +45,16 @@ Item{ Layout.fillWidth:true Layout.fillHeight: true function showContacts(contact){ - try {contactsModel.clear()} catch(e){print(e)}; - Helperjs.readData(db, "contacts",root.login.username,function(contactsobject){ + try {contactsModel.clear()} catch(e){}; + Newsjs.listFriends(login,db,function(contactsobject){ for (var j=0;j1){ + contactsobject[j].screen_name=contactsobject[j].screen_name+"+"+contactsobject[j].cid + } contactsModel.append({"contact":contactsobject[j]}); } - },"isFriend",0,"screen_name ASC"); + },searchText.text,-1); } MButton { id: cleanButton @@ -61,17 +64,40 @@ Item{ anchors.right: parent.right onClicked: { Service.cleanContacts(root.login,root.db,function(){ - try {contactsModel.clear()} catch(e){print(e)}; - Helperjs.readData(db, "contacts",root.login.username,function(contactsobject){ - for (var j=0;j +// +// 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 . + +import QtQuick 2.11 +import QtQuick.Controls 2.12 +import QtQuick.Controls.Material 2.12 +import QtQuick.Layouts 1.11 +import QtQuick.LocalStorage 2.0 +import "qrc:/js/helper.js" as Helperjs +import "qrc:/js/service.js" as Service +import "qrc:/js/news.js" as Newsjs +import "qrc:/qml/contactqml" +import "qrc:/qml/genericqml" + +Page{ + id: contactsSearchPage + + + function search(term){ + contactSearchBusy.running=true; + try {contactsSearchModel.clear()} catch(e){}; + xhr.clearParams(); + xhr.setLogin(login.username+":"+Qt.atob(login.password)); + xhr.setUrl(login.server); + xhr.setApi("/api/v1/accounts/search"); + xhr.setParam("q",term); + xhr.setParam("limit",99) + xhr.get(); + } + + Connections{ + target:xhr + function onError(data,url,api,code){ + if (data !="contactlist"){Helperjs.showMessage(qsTr("Network Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root);} + contactSearchBusy.running=false; + } + function onSuccess(data,api){ + if (api=="/api/v1/accounts/search" && data!=""){ + try{var searchlist = JSON.parse(data);}catch(e){print("Error "+e)} + contactSearchBusy.running=false; + if (Array.isArray(searchlist)){ + searchlist.sort(function(a,b){ + if (a.group > b.group) { + return -1; + } + if (a.group < b.group) { + return 1; + } + return 0 + }) + for (let i=0;i1){ friendsobject[i].screen_name=friendsobject[i].screen_name+"+"+friendsobject[i].cid } friendsModel.append({"contact":friendsobject[i],"contactType":qsTr("Friends")}); } - },"isFriend",1,"screen_name ASC"); + },(searchText.text==""?searchText.preeditText:searchText.text)); } + Connections{ target:xhr function onDownloaded(type,url,filename,i){ @@ -84,6 +84,7 @@ Item{ } } } + MButton { id: updateFriendsButton text: "\uf021" @@ -95,6 +96,7 @@ Item{ Helperjs.deleteData(root.db,"friendshiprequests",root.login.username,function(){}); updatenews.setDatabase(); updatenews.login(); + updatenews.setSyncAll(false); updatenews.friendrequests(); //root.contactLoadType="friends"; Newsjs.requestFriends(root.login,db,root,function(nc){ @@ -115,12 +117,34 @@ Item{ value: friendsGridTab.currentContact/root.newContacts.length } + Rectangle { + id:searchComponent + x: mm; y:mm + color: Material.backgroundColor + radius:0.5*mm + width: 10*root.fontFactor*osSettings.bigFontSize + height: 2*root.fontFactor*osSettings.bigFontSize + TextField { + id: searchText + color: Material.primaryTextColor + focus: true + font.pointSize: osSettings.systemFontSize + wrapMode: Text.Wrap + anchors.fill:parent + selectByMouse: true + cursorVisible: false + placeholderText: "\uf0b0" + onTextChanged: if (text.length>0){showFriends(root.login.username)} + onPreeditTextChanged: {if (preeditText.length>0){showFriends(root.login.username)}} + } + } + Component { id: sectionHeading Rectangle { width: friendsView.width height: childrenRect.height - color: Material.dialogColor //color: "lightsteelblue" + color: Material.backgroundColor required property string section Text { color: Material.secondaryTextColor @@ -131,6 +155,28 @@ Item{ } } //GridView { + + + Component { id:headerComponent + Rectangle{ + color: Material.dialogColor + width:friendsView.width + height:6*mm + Text{ + color: Material.primaryTextColor + font.pointSize: osSettings.bigFontSize + anchors.centerIn: parent + text:"\uf234" + } + MouseArea{ + anchors.fill:parent + onClicked:{ + rootstackView.push("qrc:/qml/contactqml/ContactsSearchPage.qml") + } + } + } + } + ListView{ id: friendsView x:mm @@ -145,6 +191,7 @@ Item{ // } model: friendsModel delegate: ContactComponent { } + header:headerComponent section.property: "contactType" section.criteria: ViewSection.FullString section.delegate: sectionHeading diff --git a/source-linux/qml/contactqml/FriendsTab.qml b/source-linux/qml/contactqml/FriendsTab.qml index 061ed19..48bdd86 100644 --- a/source-linux/qml/contactqml/FriendsTab.qml +++ b/source-linux/qml/contactqml/FriendsTab.qml @@ -65,38 +65,38 @@ Rectangle { TabBar { id: friendsbar - width: osSettings.osType=="Android"?parent.width-2*osSettings.bigFontSize:parent.width - height: 9*mm - x: osSettings.osType=="Android"?2*osSettings.bigFontSize:0 + width: osSettings.osType=="Android"?parent.width-2*root.fontFactor*osSettings.bigFontSize:parent.width + height: 2*root.fontFactor*osSettings.bigFontSize + x: osSettings.osType=="Android"?2*root.fontFactor*osSettings.bigFontSize:0 visible: !wideScreen position:TabBar.Header currentIndex: 1 TabButton { text: qsTr("Me") font.pointSize: osSettings.systemFontSize - height: 7*mm + height: 1.7*root.fontFactor*osSettings.bigFontSize//7*mm } TabButton { text: qsTr("Friends") font.pointSize: osSettings.systemFontSize - height: 7*mm + height: 1.7*root.fontFactor*osSettings.bigFontSize//7*mm } TabButton { text: qsTr("Contacts") font.pointSize: osSettings.systemFontSize - height: 7*mm + height: 1.7*root.fontFactor*osSettings.bigFontSize//7*mm } TabButton { text: qsTr("Groups") font.pointSize: osSettings.systemFontSize - height: 7*mm + height: 1.7*root.fontFactor*osSettings.bigFontSize//7*mm } } LeftDrawerLinux{ id:leftDrawer visible: wideScreen&&rootstackView.depth<2 - width: visible?osSettings.systemFontSize*15:0 + width: visible?root.fontFactor*osSettings.systemFontSize*15:0 height: root.height-bar.height } diff --git a/source-linux/qml/contactqml/GroupComponent.qml b/source-linux/qml/contactqml/GroupComponent.qml index 19947a7..b7bc434 100644 --- a/source-linux/qml/contactqml/GroupComponent.qml +++ b/source-linux/qml/contactqml/GroupComponent.qml @@ -56,16 +56,8 @@ Item { height: parent.height-mm radius: 0.5*mm border.color: "grey" - color:Material.backgroundColor//"white" + color:Material.backgroundColor -// Image { -// id: photoImage -// x:1 -// y:1 -// width: 10*mm -// height:10*mm -// source:"qrc:/images/defaultcontact.jpg" -// } Rectangle{ id:namelabelRect x: 1 @@ -147,112 +139,7 @@ Item { delegate: ContactComponent { }// groupMember function processContactSelection(contactobject){showContactdetails(contactobject)} } - ListModel{id: groupModel} - -// Component { -// id:groupMember -// Rectangle{ -// width:parent.width -// height:6*mm -// Rectangle{id:memberrectangle -// border.color: "#EEEEEE" -// border.width: 1 -// width:parent.width-12*mm -// height:6*mm -// Image { -// id: memberImage -// x:1 -// y:1 -// width: 5*mm -// height:5*mm -// source:(groupmember.isFriend==1)? "file://"+groupmember.profile_image :groupmember.profile_image_url -// onStatusChanged: if (photoImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"} -// } -// Text{ -// font.pixelSize: 3*mm -// anchors.left: memberImage.right -// anchors.margins: 1*mm -// width:parent.width-1 -// text:groupmember.name -// } -// MouseArea{ -// anchors.fill: parent -// onClicked:{ -//// root.currentIndex=1; -//// friendstab.active=true; -//// root.contactdetailsSignal(groupmember) -// root.currentIndex=0; -// root.contactdetailsSignal(groupmember) -// } -// } -// // BlueButton{ -// // anchors.left: memberrectangle.right -// // anchors.margins: 1*mm -// // text: "\uf056" -// // onClicked:{ -// // groupModel.remove(index) -// // } -// // } -// } -// } -// } - - - -// Row{ -// anchors.top: groupListView.bottom -// anchors.topMargin: mm -// spacing: mm -// } - -// BlueButton{ -// id: addMembers -// text:"\uf234" -// onClicked: { -// Newsjs.listFriends(root.login,root.db,function(userdata){ -// var newlistcontacts=[]; -// for (var n in userdata){ -// if (groupmembers.indexOf(userdata[n].id)==-1){ -// newlistcontacts.push(userdata[n]) -// } -// } -// var component = Qt.createComponent("qrc:/qml/contactqml/Contactlist.qml"); -// var contactlistobject = component.createObject(groupListView,{"possibleUsers":newlistcontacts}); - -// }) -// } -// } - -// BlueButton{ -// id: updateButton -// text: "\uf0ee" -// onClicked:{ -// var groupobject={}; -// var groupmembers=[]; -// for (var i=0;i"+qsTr("Connect")+"
") Rectangle { id: wrapper width:parent.width - height: parent.height//8*mm + height: parent.height radius: 0.5*mm - border.color: Material.backgroundDimColor// "grey" - color: Material.backgroundColor//"white" + border.color: Material.backgroundDimColor + color: Material.backgroundColor Image { id: photoImage x:0.5*mm y:0.5*mm - width: 4*root.fontFactor*osSettings.systemFontSize//7*mm - height:4*root.fontFactor*osSettings.systemFontSize//7*mm + width: 4*root.fontFactor*osSettings.systemFontSize + height:4*root.fontFactor*osSettings.systemFontSize source:((contact.profile_image!="") && (typeof(contact.profile_image)=="string"))? "file://"+contact.profile_image : contact.profile_image_url onStatusChanged: {if (photoImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}} } Flow{ - width: wrapper.width-4*root.fontFactor*osSettings.systemFontSize//8*mm + width: wrapper.width-4*root.fontFactor*osSettings.systemFontSize height: wrapper.height-mm anchors.left: photoImage.right - anchors.margins: 1*mm - //spacing: mm + anchors.margins: 0.5*mm clip: true Label { id: namelabel - width: Math.min(wrapper.width-(photoImage.width+mm),contentWidth)//wrapper.width-4 - height: 1.1*root.fontFactor*osSettings.bigFontSize//3*mm + width: Math.min(wrapper.width-(photoImage.width+mm),contentWidth) + height: 1.1*root.fontFactor*osSettings.bigFontSize text: contact.name elide: contentWidth>wrapper.width-4*osSettings.systemFontSize?Text.ElideRight:Text.ElideNone - color: Material.secondaryTextColor//"#303030" + color: Material.secondaryTextColor font.pointSize: osSettings.bigFontSize } Label { id: screennamelabel - width: Math.min(wrapper.width-4*root.fontFactor*osSettings.systemFontSize,contentWidth)//contentWidth+2*mm//wrapper.width-8*mm - height: 1.1*root.fontFactor*osSettings.bigFontSize//3*mm + width: Math.min(wrapper.width-4*root.fontFactor*osSettings.systemFontSize,contentWidth) + height: 1.1*root.fontFactor*osSettings.bigFontSize text: "(@"+contact.screen_name+")" elide: contentWidth>wrapper.width-4*root.fontFactor*osSettings.systemFontSize?Text.ElideRight:Text.ElideNone - color: Material.secondaryTextColor//"#303030" + color: Material.secondaryTextColor font.pointSize: osSettings.bigFontSize } Label { id: descriptionlabel - width: Math.min(wrapper.width-4*root.fontFactor*osSettings.systemFontSize,contentWidth)//contentWidth+2*mm//wrapper.width-8*mm - height: 2*root.fontFactor*osSettings.systemFontSize//2.5*mm + width: wrapper.width-5*root.fontFactor*osSettings.systemFontSize + height: wrapper.height-mm-1.1*root.fontFactor*osSettings.bigFontSize + maximumLineCount:2 text: Qt.atob(contact.description)!=""?contact.description:"" - elide:contentWidth>wrapper.width-4*root.fontFactor*osSettings.systemFontSize?Text.ElideRight:Text.ElideNone - color: Material.secondaryTextColor//"#303030" + elide:Text.ElideRight + color: Material.secondaryTextColor font.pointSize: osSettings.systemFontSize } } diff --git a/source-linux/qml/genericqml/LeftDrawerLinux.qml b/source-linux/qml/genericqml/LeftDrawerLinux.qml index 46cf4e5..dae1e0f 100644 --- a/source-linux/qml/genericqml/LeftDrawerLinux.qml +++ b/source-linux/qml/genericqml/LeftDrawerLinux.qml @@ -53,5 +53,5 @@ Rectangle{ anchors.right: leftDrawer.right color: Material.dialogColor//"#EEEEEE" } - Component.onCompleted: {opened();} + //Component.onCompleted: {opened();} } diff --git a/source-linux/qml/genericqml/LinuxSync.qml b/source-linux/qml/genericqml/LinuxSync.qml index 9abc6e9..2c201df 100644 --- a/source-linux/qml/genericqml/LinuxSync.qml +++ b/source-linux/qml/genericqml/LinuxSync.qml @@ -8,6 +8,7 @@ Item { onTriggered: { updatenews.setDatabase(); updatenews.login(); + updatenews.setSyncAll(true) updatenews.startsync(); } } diff --git a/source-linux/qml/genericqml/PermissionDialog.qml b/source-linux/qml/genericqml/PermissionDialog.qml index e0e7c13..3e71ffe 100644 --- a/source-linux/qml/genericqml/PermissionDialog.qml +++ b/source-linux/qml/genericqml/PermissionDialog.qml @@ -38,67 +38,68 @@ import "qrc:/qml/genericqml" Rectangle{ id:permissionDialog color: Material.backgroundColor -// x: mm + // x: mm width: parent.width-5*mm height:root.height/3 function updatePerms(){ for (var i=0;i-1){contactstatus="positive"} - else if (contact_deny.indexOf(contacts[name].cid)>-1){contactstatus="negative"} - contactModel.append({"contact":contacts[name],"contactstatus":contactstatus}) - }},"isFriend",1,"name"); + var contactstatus="neutral"; + if (contact_allow.indexOf(contacts[name].cid)>-1){contactstatus="positive"} + else if (contact_deny.indexOf(contacts[name].cid)>-1){contactstatus="negative"} + contactModel.append({"contact":contacts[name],"contactstatus":contactstatus}) + }},"isFriend",1,"name"); - Helperjs.readData(db,"groups",login.username,function(owngroups){ + Helperjs.readData(db,"groups",login.username,function(owngroups){ for (var number in owngroups){ - var groupstatus= "neutral"; - if (group_allow.indexOf(owngroups[number].gid)>-1){groupstatus="positive"} - else if (group_deny.indexOf(owngroups[number].gid)>-1){groupstatus="negative"} - groupModel.append({"group":owngroups[number],"groupstatus":groupstatus}) - }}); - } + var groupstatus= "neutral"; + if (group_allow.indexOf(owngroups[number].gid)>-1){groupstatus="positive"} + else if (group_deny.indexOf(owngroups[number].gid)>-1){groupstatus="negative"} + groupModel.append({"group":owngroups[number],"groupstatus":groupstatus}) + }}); + } } diff --git a/source-linux/qml/genericqml/Search.qml b/source-linux/qml/genericqml/Search.qml index be8ddb6..93b85f0 100644 --- a/source-linux/qml/genericqml/Search.qml +++ b/source-linux/qml/genericqml/Search.qml @@ -38,6 +38,7 @@ Rectangle { id:searchComponent color: Material.backgroundColor radius:0.5*mm + property bool selfdestroying:false /* anchors.left: parent.left anchors.leftMargin:mm anchors.top:parent.top @@ -54,7 +55,10 @@ Rectangle { anchors.fill: parent selectByMouse: true cursorVisible: false - onEditingFinished:{ if (displayText!=""){search(displayText)};searchComponent.destroy()} + onAccepted:{ + if (displayText!=""){search(displayText)}; + if(selfdestroying){searchComponent.destroy()} + } } Component.onCompleted: searchText.forceActiveFocus() } diff --git a/source-linux/qml/newsqml/ContactPage.qml b/source-linux/qml/newsqml/ContactPage.qml index 0f49d78..8bd1459 100644 --- a/source-linux/qml/newsqml/ContactPage.qml +++ b/source-linux/qml/newsqml/ContactPage.qml @@ -44,8 +44,6 @@ Page { property var contact:({}) property string profileimagesource:contact.profile_image - //function backRequested(){pageStack.pop()} - function getDateDiffString (seconds){ var timestring=""; if (seconds<60) {timestring= Math.round(seconds) + " " +qsTr("seconds");} @@ -141,14 +139,12 @@ Page { Component { id: contactHeader Rectangle{ - border.color: Material.backgroundDimColor//"#EEEEEE" + border.color: Material.backgroundDimColor border.width: 1 - color: Material.backgroundColor//"white" + color: Material.backgroundColor width:contactView.width height: contactView.width<35*root.fontFactor*osSettings.systemFontSize?(profileImage.height+namelabel.height+detailtext.height+7*mm):Math.max(profileImage.height,(buttonflow.height+namelabel.height+detailtext.height))+7*mm - //height: wrapper.height property var createdAtDate: new Date(contact.created_at) - property string connectUrl: (contact.network!=="dfrn")||(contact.isFriend!=0)?"":( ""+qsTr("Connect")+"
") Image { id: profileImage @@ -160,7 +156,7 @@ Page { onStatusChanged: if (profileImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"} Connections{ target:contactList - onProfileimagesourceChanged:profileImage.source=profileimagesource + function onProfileimagesourceChanged(){profileImage.source=profileimagesource} } } Flow{id:buttonflow @@ -175,7 +171,7 @@ Page { id:photobutton height: 6*mm width: 8*mm - text: "\uf03e" // "Photos" + text: "\uf03e" visible:(contact.network=="dfrn") onClicked:{ rootstack.currentIndex=2; @@ -193,7 +189,7 @@ Page { height: 6*mm width: 8*mm visible: (contact.following=="true") - text: "\uf040" //"DM" + text: "\uf040" onClicked:{ rootstack.currentIndex=0; newsSwipeview.currentIndex=2; @@ -217,9 +213,8 @@ Page { } MButton{ id:approvebutton - visible:(contact.hasOwnProperty("acct")) + visible:(contact.hasOwnProperty("acct")&&!contact.searchContact) height: 6*mm - //width: implicitContentWidth+2*mm//8*mm text:qsTr("Approve") onClicked:{ @@ -232,9 +227,8 @@ Page { } MButton{ id:rejectbutton - visible:(contact.hasOwnProperty("acct")) + visible:(contact.hasOwnProperty("acct")&&!contact.searchContact) height: 6*mm - //width: implicitContentWidth+2*mm//8*mm text:qsTr("Reject") onClicked:{ Helperjs.friendicaPostRequest(login,"/api/v1/follow_requests/" + contact.id + "/reject",'',"POST",root,function(returnvalue){ @@ -246,9 +240,8 @@ Page { } MButton{ id:ignorebutton - visible:(contact.hasOwnProperty("acct")) + visible:(contact.hasOwnProperty("acct")&&!contact.searchContact) height: 6*mm - //width: implicitContentWidth+2*mm//8*mm text:qsTr("Ignore") onClicked:{ Helperjs.friendicaPostRequest(login,"/api/v1/follow_requests/" + contact.id + "/ignore",'',"POST",root,function(returnvalue){ @@ -260,9 +253,8 @@ Page { } MButton{ id:followbutton - visible:(contact.isFriend==0) + visible:(contact.isFriend==0 || !contact.hasOwnProperty("isFriend")) height: 6*mm - //width: implicitContentWidth+2*mm//8*mm text:qsTr("Follow") onClicked:{ contactBusy.running=true; @@ -281,7 +273,6 @@ Page { id:unfollowbutton visible:(contact.isFriend==1) height: 6*mm - //width: implicitContentWidth+2*mm//8*mm text:qsTr("Unfollow") onClicked:{ Helperjs.friendicaPostRequest(login,"/api/v1/accounts/" + contact.id + "/unfollow",'',"POST",root,function(returnvalue){ @@ -297,12 +288,11 @@ Page { }//Flow end Label { id: namelabel - //x:mm width: contactView.width<35*root.fontFactor*osSettings.systemFontSize?contactView.width-2*mm:contactView.width-17*root.fontFactor*osSettings.bigFontSize height: implicitHeight text:contact.name+" (@"+contact.screen_name+")" - wrapMode: Text.Wrap//elide:Text.ElideRight - color: Material.primaryTextColor//"#303030" + wrapMode: Text.Wrap + color: Material.primaryTextColor font.pointSize: 1.2*osSettings.bigFontSize font.family: "Noto Sans" anchors.top: contactView.width<35*root.fontFactor*osSettings.systemFontSize?profileImage.bottom:buttonflow.bottom @@ -314,7 +304,6 @@ Page { anchors.top: namelabel.bottom anchors.left: contactView.width<35*root.fontFactor*osSettings.systemFontSize?contactView.left:profileImage.right anchors.margins: 2*mm - //x:mm width: contactView.width<35*root.fontFactor*osSettings.systemFontSize?contactView.width-2*mm:contactView.width-17*root.fontFactor*osSettings.bigFontSize height: implicitHeight font.pointSize: osSettings.systemFontSize @@ -324,15 +313,11 @@ Page { color: Material.primaryTextColor text:""+qsTr("Description")+": "+(Qt.atob(contact.description)!=""?contact.description:"")+"
"+qsTr("Location")+": "+contact.location+"
"+qsTr("Posts")+": "+contact.statuses_count+ "
"+qsTr("URL")+": "+contact.url+"
"+ - connectUrl+ ""+qsTr("Created at")+": "+createdAtDate.toLocaleString(Qt.locale()) + ""+qsTr("Created at")+": "+createdAtDate.toLocaleString(Qt.locale()) onLinkActivated: { Qt.openUrlExternally(link)} } - - - //} } - }//Component end Connections{ @@ -342,8 +327,9 @@ Page { contactBusy.running=false; } function onSuccess(data,api){ - Service.processNews(api,data) - //replySignal("") + if (api=="/api/statuses/user_timeline"){ + Service.processNews(api,data) + } } } @@ -373,7 +359,6 @@ Page { anchors.rightMargin: 1*mm width: 2*root.fontFactor*osSettings.bigFontSize; text: "\uf057" - //font.pixelSize: 3*mm onClicked: { rootstackView.pop() } @@ -382,9 +367,10 @@ Page { xhr.clearParams(); xhr.setLogin(login.username+":"+Qt.atob(login.password)); xhr.setUrl(login.server); - if(contact.isFriend==1 || contact.hasOwnProperty("acct")){ - xhr.setApi("/api/statuses/user_timeline");} - else{xhr.setApi("/api/users/show");} + // if(contact.isFriend==1 || contact.hasOwnProperty("acct")){ + // xhr.setApi("/api/statuses/user_timeline");} + // else{xhr.setApi("/api/users/show");} + xhr.setApi("/api/statuses/user_timeline") xhr.setParam("user_id",contact.id) xhr.get(); } diff --git a/source-linux/qml/newsqml/MessageSend.qml b/source-linux/qml/newsqml/MessageSend.qml index b7023e7..5159d0b 100644 --- a/source-linux/qml/newsqml/MessageSend.qml +++ b/source-linux/qml/newsqml/MessageSend.qml @@ -34,7 +34,6 @@ import QtQuick 2.4 import QtQuick.Controls 2.12 import QtQuick.Controls.Material 2.12 -//import QtQuick.Dialogs 1.2 import "qrc:/js/helper.js" as Helperjs import "qrc:/js/smiley.js" as Smileyjs import "qrc:/js/news.js" as Newsjs @@ -42,19 +41,17 @@ import "qrc:/qml/genericqml" Rectangle{ - color:Material.dialogColor//"#EEEEEE" + color:Material.dialogColor width:parent.width - height: conversation || (newsSwipeview.stacktype!="Notifications")?messageColumn.height+mm:0 + height: conversation || (newsSwipeview.stacktype!="Notifications")?messageColumn.height+2*mm:0 id:messageSend visible:conversation || (newsSwipeview.stacktype!="Notifications")||(newstab.newstabstatus!="Search")?true:false property string parentId: "" property bool textfocus: false - //property var parentObject:({}) property bool conversation: false property string reply_to_user:"" property alias bodyMessage: bodyField.text property var attachImageURLs: []; - //property int directmessage: 0; property var contacts: [] property var groups: [] property var contact_allow:login.hasOwnProperty("permissions")?login.permissions[0]:[] @@ -130,13 +127,12 @@ Rectangle{ } function setParent(newsitemobject){ - //print("Newsobject "+newsitemobject.id+ " "+JSON.stringify(newsitemobject.user)); if (newsitemobject!=""){ messageSend.state="conversation" messageSend.reply_to_user=newsitemobject.user.screen_name; messageSend.parentId=newsitemobject.id } else { - //messageSend.state=null; + messageSend.state=null; messageSend.reply_to_user=""; messageSend.parentId=""; bodyField.text=""; @@ -145,7 +141,7 @@ Rectangle{ } } - function contactmenu(letter){//print("letter "+letter) + function contactmenu(letter){ Newsjs.listFriends(login,db,function(contacts){ contactModel.clear(); for (var i=0;i1)||(attachImageURLs.length>0) spacing: mm - height: 12*mm + height: 2.5*root.fontFactor*osSettings.bigFontSize//12*mm x: 0.5*mm - MButton{id:permButton - visible: !conversation && (newsSwipeview.stacktype!=="DirectMessages") - height: 2*root.fontFactor*osSettings.bigFontSize - width: 2*root.fontFactor*osSettings.bigFontSize - text: ((contact_allow.length==0)&&(contact_deny.length==0)&&(group_allow.length==0)&&(group_deny.length==0))?"\uf09c":"\uf023" - onClicked: { if (permissionDialog.visible==false){permissionDialog.visible=true} else{permissionDialog.visible=false}} - } +// MButton{id:permButton //Permissions not working in Friendica 02/2022 +// visible: !conversation && (newsSwipeview.stacktype!=="DirectMessages") +// height: 2*root.fontFactor*osSettings.bigFontSize +// width: 2*root.fontFactor*osSettings.bigFontSize +// text: ((contact_allow.length==0)&&(contact_deny.length==0)&&(group_allow.length==0)&&(group_deny.length==0))?"\uf09c":"\uf023" +// onClicked: { if (permissionDialog.visible==false){permissionDialog.visible=true} else{permissionDialog.visible=false}} +// } MButton { id: attachButton height: 2*root.fontFactor*osSettings.bigFontSize @@ -440,8 +450,8 @@ Rectangle{ var body=bodyField.getFormattedText(0,bodyField.length); var dmbody=bodyField.getText(0,bodyField.length); if (conversation || newsSwipeview.stacktype!=="DirectMessages"){ - statusUpdate(title,body,parentId,attachImageURLs)} - else { + statusUpdate(title,body,parentId,attachImageURLs) + }else { if (reply_to_user!=""){dmUpdate(title,dmbody,parentId,reply_to_user)} else{Helperjs.showMessage(qsTr("Error"),qsTr("No receiver supplied!"),root)} } diff --git a/source-linux/qml/newsqml/NewsImage.qml b/source-linux/qml/newsqml/NewsImage.qml index 1bba645..0a7c71e 100644 --- a/source-linux/qml/newsqml/NewsImage.qml +++ b/source-linux/qml/newsqml/NewsImage.qml @@ -55,7 +55,7 @@ AnimatedImage {id:gif; MouseArea {anchors.fill:parent; onClicked:{ rootstackView.push("qrc:/qml/newsqml/NewsPhotolist.qml",{"photolistarray": model.newsitemobject.imageAttachmentList}) - roottoolbar.visible=false + //roottoolbar.visible=false } } } diff --git a/source-linux/qml/newsqml/NewsPhotolist.qml b/source-linux/qml/newsqml/NewsPhotolist.qml index 929ed67..b51dd10 100644 --- a/source-linux/qml/newsqml/NewsPhotolist.qml +++ b/source-linux/qml/newsqml/NewsPhotolist.qml @@ -69,7 +69,7 @@ Page{ text: "\uf057" onClicked: { if (rootstackView.depth>1){ - roottoolbar.visible=true; + //roottoolbar.visible=true; rootstackView.pop()} } } diff --git a/source-linux/qml/newsqml/NewsStack.qml b/source-linux/qml/newsqml/NewsStack.qml index 582eb66..bcbd5fe 100644 --- a/source-linux/qml/newsqml/NewsStack.qml +++ b/source-linux/qml/newsqml/NewsStack.qml @@ -49,7 +49,6 @@ Rectangle{ BusyIndicator{ id: newsBusy - //visible: false anchors.horizontalCenter: parent.horizontalCenter anchors.top:parent.top anchors.topMargin: 2*mm @@ -60,10 +59,8 @@ Rectangle{ } function newstypeHandling(newstype){ - newsBusy.running=true; + try{newsBusy.running=true}catch(e){print(e)}; replySignal(""); - //messagesend.state=""; - //newsModel.clear(); switch(newstype){ case "timeline": newstab.newstabstatus="Timeline"; @@ -75,7 +72,7 @@ Rectangle{ case "conversation": newsStack.updateMethodNews="conversation"; newstab.newstabstatus="Conversations"; - Newsjs.chatsfromdb(root.db,root.login,0,function(news,lastid){ + Newsjs.chatsfromdb(root.db,root.login,0,[],function(news,lastid){ lastnewsid=lastid; showNews(news)}); break; @@ -105,7 +102,7 @@ Rectangle{ newsBusy.running=false; var leftoffset=(osSettings.osType=="Android")?2*root.fontFactor*osSettings.bigFontSize:0 var component = Qt.createComponent("qrc:/qml/genericqml/Search.qml"); - var searchItem = component.createObject(newsStack,{y:mm,x:leftoffset,width:root.width-(leftoffset+mm),height: 1.5*root.fontFactor*osSettings.systemFontSize}); + var searchItem = component.createObject(newsStack,{y:mm,x:leftoffset,width:root.width-(leftoffset+mm),height: 1.5*root.fontFactor*osSettings.systemFontSize,selfdestroying:true}); break; case "refresh": if (newstab.newstabstatus=="Timeline" || newstabstatus=="Timeline"){ @@ -147,20 +144,19 @@ Rectangle{ function showNews(newsToShow){ try{if (rootstackView.depth>1){rootstackView.pop()}}catch(e){} newsBusy.running=false; - var currentTime= new Date(); - // downloadNotice.text=downloadNotice.text + "\n shownews start "+ Date.now(); - //print("appendnews "+JSON.stringify(newsToShow)) - if (newsToShow.length==1){var method="refresh"}else{var method = newsStack.updateMethodNews} - var msg = {'currentTime': currentTime, 'model': newsModel,'news':newsToShow,'method':method, 'options':globaloptions}; - newsWorker.sendMessage(msg); - //newsStack.appendNews=false + if(newsToShow.length>0){ + var currentTime= new Date() + // downloadNotice.text=downloadNotice.text + "\n shownews start "+ Date.now(); + if (newsToShow.length==1){var method="refresh"}else{var method = newsStack.updateMethodNews} + var msg = {'currentTime': currentTime, 'model': newsModel,'news':newsToShow,'method':method, 'options':globaloptions}; + newsWorker.sendMessage(msg); + } } function search(term){ if (term!=""){ - //newstab.newstabstatus="Search"; newstabstatus="Search"; newsBusy.running=true; newsStack.updateMethodNews="refresh"; @@ -179,10 +175,12 @@ Rectangle{ try{var oldnewsitemobject=newsModel.get(newsModel.count-1).newsitemobject; if(oldnewsitemobject.hasOwnProperty("lastcomment")){ var lastnews_id=oldnewsitemobject.lastcomment.created_at; + //var lastconv_id=oldnewsitemobject.lastcomment.statusnet_conversation_id }else{ var lastnews_id=oldnewsitemobject.created_at; + //var lastconv_id=oldnewsitemobject.statusnet_conversation_id } - } catch(e){print(e);var lastnews_id=99999999999999 } + } catch(e){print(e);var lastnews_id=99999999999999} var messagetype=0; switch(newsSwipeview.stacktype){ case "Home":messagetype=0;break; @@ -192,14 +190,19 @@ Rectangle{ default:messagetype=0; } - if(newstab.newstabstatus=="Timeline" || newstabstatus=="Timeline" ){ + if(newsSwipeview.stacktype!="Home"|| newstab.newstabstatus=="Timeline" || newstabstatus=="Timeline" ){ Newsjs.newsfromdb(root.db,root.login, messagetype,function(news){ var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'method':"", 'options':globaloptions}; newsWorker.sendMessage(msg); },false,lastnews_id)} else if(newstab.newstabstatus=="Conversations" || newstabstatus=="Conversations"){ - Newsjs.chatsfromdb(root.db,root.login, messagetype,function(news){ + var currentconversations=[]; + for (let c=0;c -// -// 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 . - -import QtQuick 2.8 -import QtQuick.Controls 2.12 -import "qrc:/js/helper.js" as Helperjs -import QtWebView 1.1 - - -Page { - id:newsYplayer - //color:"black" - width:root.width; - height:root.height-7*mm - property string url:"" - property string ytcode:"" - - WebView { - id: webView - anchors.fill: parent - z:1 - opacity: 0 - - url: root.osSettings.osType=="Android"?"https://youtube.com/watch?v="+ytcode:"qrc:/js/yplayer.html?" + ytcode - - Behavior on opacity { NumberAnimation { duration: 200 } } - - onLoadingChanged: { - switch (loadRequest.status) - { - case WebView.LoadSucceededStatus: - opacity = 1 - return - case WebView.LoadStartedStatus: - case WebView.LoadStoppedStatus: - break - case WebView.LoadFailedStatus: - print("Failed to load the requested video" + url) - break - } - opacity = 0 - } - onTitleChanged: { - if (title==2){root.pop()} - } - } -} diff --git a/source-linux/qml/newsqml/Newsitem.qml b/source-linux/qml/newsqml/Newsitem.qml index decc707..5dfddc3 100644 --- a/source-linux/qml/newsqml/Newsitem.qml +++ b/source-linux/qml/newsqml/Newsitem.qml @@ -58,23 +58,21 @@ Item { function pushConversation(){ if (model.newsitemobject.hasOwnProperty("currentconversation")){ rootstackView.push("qrc:/qml/newsqml/Conversation.qml",{"news": model.newsitemobject.currentconversation})} - //newsStack.push("qrc:/qml/newsqml/Conversation.qml",{"news": model.newsitemobject.currentconversation})} - //else{newsStack.push("qrc:/qml/newsqml/Conversation.qml")}; else{rootstackView.push("qrc:/qml/newsqml/Conversation.qml")}; showConversation(index,newsitemobject) } Rectangle{width:newsitem.width; height: 1; anchors.bottom: newsitem.bottom; - color: Material.backgroundDimColor//"light grey" + color: Material.backgroundDimColor } Rectangle{ width:newsitem.width height:newsitem.height-1 - color: Material.background//"white" + color: Material.background Column { - id:toprow //newscolumn + id:toprow width: newsitemobject.hasOwnProperty("indent")?newsitem.width-(newsitem.width/20 *(newsitemobject.indent+1)):newsitem.width//-8*mm x:newsitemobject.hasOwnProperty("indent")?newsitem.width/20*(newsitemobject.indent):0 height: newsitemobject.nsfw?5*mm:Math.min(implicitHeight,3/4*root.height) @@ -105,7 +103,6 @@ Item { anchors.margins: mm Label { id:user_name - //color: "grey" width:parent.width font.bold: true font.pointSize: osSettings.systemFontSize @@ -115,25 +112,24 @@ Item { Label { id:messageTypeLabel - color: Material.secondaryTextColor//"grey" + color: Material.secondaryTextColor text: if (newsitemobject.messagetype==1){ qsTr("Direct Message")} else if(newsitemobject.messagetype==2) {" Notification"} else {qsTr("Source: ")+newsitemobject.source} font.pointSize: 0.6*osSettings.systemFontSize } Label { id:createdAtLabel - color: Material.secondaryTextColor//"grey" + color: Material.secondaryTextColor font.pointSize: 0.6*osSettings.systemFontSize horizontalAlignment: Label.AlignRight text: " \u00B7 "+getDateDiffString(newsitemobject.dateDiff) + " " +qsTr("ago") } Label { id:replytoLabel - color: Material.secondaryTextColor//"grey" + color: Material.secondaryTextColor font.pointSize: 0.6*osSettings.systemFontSize font.family: "Noto Sans" horizontalAlignment: Label.AlignRight - text: try {" \u00B7 "+qsTr("In reply to ")+newsitemobject.reply_user.screen_name - }catch(e){" "} + text: (newsitemobject.in_reply_to_status_id!="null"&&newsitemobject.in_reply_to_status_id!=null)?" \u00B7 "+qsTr("In reply to ")+newsitemobject.reply_user.screen_name:" " } } } @@ -141,32 +137,27 @@ Item { MouseArea{id: itemBody width: toprow.width-2 height: itemMessage.height - //onPressAndHold: {pushConversation()} onClicked: {pushConversation()} Text { - color: Material.primaryTextColor//"#404040" - linkColor: Material.accentColor//"light green" + color: Material.primaryTextColor + linkColor: Material.accentColor id: itemMessage textFormat: Text.RichText font.family: "Noto Sans" font.pointSize: osSettings.systemFontSize text: newsitemobject.statusnet_html width: toprow.width-2 - //height:newsitemobject.nsfw?5*mm:Math.min(implicitHeight,3/4*root.height) height: implicitHeight wrapMode: Text.Wrap clip:true - onLinkActivated:{Qt.openUrlExternally(link)} - Component.onCompleted:{ - if (newsitemobject.messagetype==0){ - var hashtags=[]; - hashtags=Newsjs.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()}); - } + onLinkActivated:{ + if(link.startsWith(root.login.server+"\/search\?tag=")){ + newstab.newstabstatus="Search"; + root.searchSignal(link.substring(root.login.server.length+12,link.length)) } - + else{Qt.openUrlExternally(link)} + } + Component.onCompleted:{ if (newsitemobject.imageAttachmentList.length>0){ if(newsitemobject.imageAttachmentList[0].mimetype.substring(0,5)=="image"){ var component = Qt.createComponent("qrc:/qml/newsqml/NewsImage.qml"); @@ -195,16 +186,16 @@ Item { BlueButton{ width: newsitem.width-2 height:5*mm - anchors.bottom: toprow.bottom//itemMessage.bottom - visible: toprow.implicitHeight>3/4*root.height || newsitemobject.nsfw//messageColumn.implicitHeight>3/4*root.height || newsitemobject.nsfw//itemMessage.implicitHeight>3/4*root.height + anchors.bottom: toprow.bottom + visible: toprow.implicitHeight>3/4*root.height || newsitemobject.nsfw text:"\uf078" - fontColor: Material.secondaryTextColor//"grey" + fontColor: Material.secondaryTextColor border.color: "transparent" - color: Material.backgroundColor//"white" - // gradient: Gradient { - // GradientStop { position: 0.0; color: "transparent" } - // GradientStop { position: 0.5; color: "white" } - // } + color: Material.backgroundColor +// gradient: Gradient { +// GradientStop { position: 0.0; color: "transparent" } +// GradientStop { position: 0.5; color: Material.backgroundDimColor} +// } radius:0 onClicked: { if (text=="\uf078"){ @@ -224,45 +215,45 @@ Item { width:parent.width spacing:mm - Label{color: Material.secondaryTextColor//"grey" + Label{color: Material.secondaryTextColor height:3.5*mm font.pointSize: 0.75*osSettings.systemFontSize - text: friendica_activities_view.likeText + text: newsitemobject.hasOwnProperty("isLastComment")?"":friendica_activities_view.likeText MouseArea{ anchors.fill: parent onClicked: { showActivityContacts(newsitemobject.friendica_activities.like)} } } - Label{color: Material.secondaryTextColor//"grey" + Label{color: Material.secondaryTextColor height:3.5*mm font.pointSize: 0.75*osSettings.systemFontSize - text: friendica_activities_view.dislikeText + text: newsitemobject.hasOwnProperty("isLastComment")?"":friendica_activities_view.dislikeText MouseArea{ anchors.fill: parent onClicked: { showActivityContacts(newsitemobject.friendica_activities.dislike)} } } - Label{color: Material.secondaryTextColor//"grey" + Label{color: Material.secondaryTextColor height:3.5*mm font.pointSize: 0.75*osSettings.systemFontSize - text: friendica_activities_view.attendyesText + text: newsitemobject.hasOwnProperty("isLastComment")?"":friendica_activities_view.attendyesText MouseArea{ anchors.fill: parent onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendyes)} }} - Label{color: Material.secondaryTextColor//"grey" + Label{color: Material.secondaryTextColor height:3.5*mm font.pointSize: 0.75*osSettings.systemFontSize - text: friendica_activities_view.attendnoText + text: newsitemobject.hasOwnProperty("isLastComment")?"":friendica_activities_view.attendnoText MouseArea{ anchors.fill: parent onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendno)} } } - Label{color: Material.secondaryTextColor//"grey" + Label{color: Material.secondaryTextColor height:3.5*mm font.pointSize: 0.75*osSettings.systemFontSize - text: friendica_activities_view.attendmaybeText + text: newsitemobject.hasOwnProperty("isLastComment")?"":friendica_activities_view.attendmaybeText MouseArea{ anchors.fill: parent onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendmaybe)} @@ -270,7 +261,7 @@ Item { } Label{ id:attendLabel - color: Material.secondaryTextColor//"grey" + color: Material.secondaryTextColor height:3.5*mm font.pointSize: 0.75*osSettings.systemFontSize horizontalAlignment: Label.AlignRight @@ -284,12 +275,12 @@ Item { height: root.fontFactor*osSettings.bigFontSize CheckBox{ id:likeCheckbox - width:newsitem.width/5 //10*mm + width:newsitem.width/5 height: parent.height visible: ((newsitemobject.messagetype==0)||(newsitemobject.messagetype==3))? true:false checked:(model.newsitemobject.friendica_activities_view.self.liked==1)?true:false indicator: Rectangle{ - implicitWidth: newsitem.width/5 //10*mm + implicitWidth: newsitem.width/5 implicitHeight:root.fontFactor*osSettings.bigFontSize color:"transparent" Text{ @@ -312,12 +303,12 @@ Item { } CheckBox{ id: dislikeCheckbox - width:newsitem.width/5 //10*mm + width:newsitem.width/5 height: parent.height visible: ((newsitemobject.messagetype==0)||(newsitemobject.messagetype==3))? true:false checked: (newsitemobject.friendica_activities_view.self.disliked==1)?true:false indicator: Rectangle{ - implicitWidth: newsitem.width/5 //10*mm + implicitWidth: newsitem.width/5 implicitHeight:root.fontFactor*osSettings.bigFontSize color:"transparent" Text{ @@ -339,39 +330,72 @@ Item { }} } - CheckBox { - id:favoritedCheckbox - visible:((newsitemobject.messagetype==0)||(newsitemobject.messagetype==3)) - width: newsitem.width/5 // 10*mm +// CheckBox { +// id:favoritedCheckbox +// visible:((newsitemobject.messagetype==0)||(newsitemobject.messagetype==3)) +// width: newsitem.width/5 +// height: parent.height +// indicator:Rectangle{ +// implicitWidth: newsitem.width/5 +// implicitHeight:root.fontFactor*osSettings.bigFontSize +// color:"transparent" +// Text{ +// anchors.centerIn: parent +// font.pointSize: osSettings.systemFontSize +// font.family:fontAwesome.name +// color: favoritedCheckbox.checked?Material.primaryTextColor: Material.secondaryTextColor +// text:"\uf005" +// } +// } +// checked:(newsitemobject.favorited>0) +// onClicked:{ +// if(favoritedCheckbox.checkState==Qt.Checked){ +// Newsjs.favorite(login,true,newsitemobject.id,root); model.newsitemobject.favorited=1} +// else if(favoritedCheckbox.checkState==Qt.Unchecked){ +// Newsjs.favorite(login,false,newsitemobject.id,root);model.newsitemobject.favorited=0} +// } +// } + Rectangle{ + width: newsitem.width/5 height: parent.height - indicator:Rectangle{ - implicitWidth: newsitem.width/5 //10*mm - implicitHeight:root.fontFactor*osSettings.bigFontSize - color:"transparent" - Text{ - anchors.centerIn: parent - font.pointSize: osSettings.systemFontSize - font.family:fontAwesome.name - color: favoritedCheckbox.checked?Material.primaryTextColor: Material.secondaryTextColor - text:"\uf005" - } + visible:(newsitemobject.messagetype!==2) + color:"transparent" + Text{ + id:replysymbol + color: Material.secondaryTextColor + anchors.centerIn: parent + font.pointSize: osSettings.systemFontSize + font.family:fontAwesome.name + text: "\uf112" } - checked:(newsitemobject.favorited>0) - onClicked:{ - if(favoritedCheckbox.checkState==Qt.Checked){ - Newsjs.favorite(login,true,newsitemobject.id,root); model.newsitemobject.favorited=1} - else if(favoritedCheckbox.checkState==Qt.Unchecked){ - Newsjs.favorite(login,false,newsitemobject.id,root);model.newsitemobject.favorited=0} + MouseArea{ + anchors.fill:parent + onClicked: { + var directmessage=0; + if (newsitemobject.messagetype==1){ directmessage=1} + var replycomp=Qt.createComponent("qrc:/qml/newsqml/MessageSend.qml"); + var conversation; + if (newsitem.ListView.view==null){conversation=true} + else if (newsitem.ListView.view.viewtype=="conversation"){ + conversation=true + newsitem.ListView.view.currentIndex=itemindex + } + else{ + conversation=false; + newsitem.ListView.view.currentIndex=itemindex + }; + var reply=replycomp.createObject(friendicaActivities,{parentId:newsitemobject.id,reply_to_user:newsitemobject.user.screen_name, state:"reply",conversation:conversation,textfocus:true}) + } } } Rectangle{ - width: newsitem.width/5 //10*mm + width: newsitem.width/5 height: parent.height visible:(newsitemobject.messagetype!==2) color:"transparent" Text{ id:newsmenusymbol - color: Material.secondaryTextColor//"grey" + color: Material.secondaryTextColor anchors.centerIn: parent font.pointSize: osSettings.systemFontSize font.family:fontAwesome.name @@ -393,30 +417,8 @@ Item { text: parent.text } } - Action{ - text: qsTr("Reply") - onTriggered: { - var directmessage=0; - if (newsitemobject.messagetype==1){ directmessage=1} - var replycomp=Qt.createComponent("qrc:/qml/newsqml/MessageSend.qml"); - var conversation; - if (newsitem.ListView.view==null){conversation=true} - else if (newsitem.ListView.view.viewtype=="conversation"){ - conversation=true - newsitem.ListView.view.currentIndex=itemindex - } - else{ - conversation=false; - newsitem.ListView.view.currentIndex=itemindex - }; - var reply=replycomp.createObject(friendicaActivities,{parentId:newsitemobject.id,reply_to_user:newsitemobject.user.screen_name, state:"reply",conversation:conversation,textfocus:true}) - } - } - Action { - text: qsTr("DM") - onTriggered: { - root.directmessageSignal(newsitemobject.user.screen_name); - } + onAboutToShow:{if(newsitemobject.hasOwnProperty("external_url")){ + insertAction(4,externalAction)} } Action { text: qsTr("Repost") @@ -432,7 +434,21 @@ Item { pushConversation(); } } - + Action { + text: qsTr("DM") + onTriggered: { + root.directmessageSignal(newsitemobject.user.screen_name); + } + } + Action { + text: qsTr("Bookmark") + onTriggered: { + if(model.newsitemobject.favorited==0){ + Newsjs.favorite(login,true,newsitemobject.id,root); model.newsitemobject.favorited=1} + else if(model.newsitemobject.favorited==1){ + Newsjs.favorite(login,false,newsitemobject.id,root);model.newsitemobject.favorited=0} + } + } Menu{ title: qsTr("Attending") width: 10*root.fontFactor*osSettings.systemFontSize @@ -469,11 +485,6 @@ Item { }) } } - - //MenuItem{ - // text:qsTr("Show on website") - // onTriggered:Qt.openUrlExternally(login.server+"/display/"+newsitemobject - //} } Column{ id:conversationColumn @@ -481,4 +492,8 @@ Item { width: newsitem.width } } + Action{id:externalAction + text: qsTr("External") + onTriggered: {Qt.openUrlExternally(newsitemobject.external_url)} + } } diff --git a/source-linux/qml/newsqml/SmileyDialog.qml b/source-linux/qml/newsqml/SmileyDialog.qml index 0e19dbb..4cac895 100644 --- a/source-linux/qml/newsqml/SmileyDialog.qml +++ b/source-linux/qml/newsqml/SmileyDialog.qml @@ -207,7 +207,7 @@ Rectangle{ width:4.5*mm height: 4.5*mm textFormat:Text.RichText - font.pointSize: 1.2*osSettings.systemFontSize + font.pointSize: osSettings.osType=="Linux"?1.7*osSettings.systemFontSize:1.2*osSettings.systemFontSize text: emoji MouseArea{ diff --git a/source-linux/qml/photoqml/ImageUploadDialog.qml b/source-linux/qml/photoqml/ImageUploadDialog.qml index 3a5b68d..db22dd7 100644 --- a/source-linux/qml/photoqml/ImageUploadDialog.qml +++ b/source-linux/qml/photoqml/ImageUploadDialog.qml @@ -88,7 +88,7 @@ Page{ Connections{ target:xhr - onError:{print(data)}//if (data=="image"){Helperjs.showMessage()}} + //onError:{print(data)}//if (data=="image"){Helperjs.showMessage()}} onSuccess:{ if (imageId==""){ imageNo=imageNo+1; diff --git a/source-linux/qml/photoqml/PhotoTab.qml b/source-linux/qml/photoqml/PhotoTab.qml index 40dc907..4a1c854 100644 --- a/source-linux/qml/photoqml/PhotoTab.qml +++ b/source-linux/qml/photoqml/PhotoTab.qml @@ -41,298 +41,293 @@ import "qrc:/qml/genericqml" StackView{ id: photoStack - //anchors.fill:parent initialItem:Rectangle { - id:fotorectangle - anchors.fill:parent -// y:1 -// width:root.width-mm -// height:root.height-5*mm - color: Material.backgroundColor//'#fff' - property var newimages:[] - property int currentimageno: 0 - property bool remoteContact: false + id:fotorectangle + anchors.fill:parent + color: Material.backgroundColor + property var newimages:[] + property int currentimageno: 0 + property bool remoteContact: false - onNewimagesChanged:{ - if(fotorectangle.newimages.length>0){ - var ownimagelist=[]; - Helperjs.readField("album",root.db,"imageData",root.login.username,function(albums){ - for (var i=0;i0){ + var ownimagelist=[]; + Helperjs.readField("album",root.db,"imageData",root.login.username,function(albums){ + for (var i=0;i 1){photoStack.pop()} - else if(albumgridview.currentItem==null){rootstack.currentIndex=0} - else if(albumgridview.currentItem.state=='fullscreen'){ - albumgridview.currentItem.state = 'inGrid'} - else if (albumgridview.currentItem.state == 'inGrid'){albumgridview.currentItem.state=''} - else{rootstack.currentIndex=0} - } - else{ - try {photogroupModel.clear()}catch (e){print(e)} - if (friend){ - Imagejs.newRequestFriendsAlbumPictures(login,friend,fotorectangle,function(albums,remoteAuthBool){ - remoteContact=remoteAuthBool; - var msg = {'model': photogroupModel,'albums':albums,'firstalbum':0,'foreignPicture':true,'friend':friend} - photoWorker.sendMessage(msg); - }) - phototabstatusButton.text=friend.screen_name+qsTr("\'s images") - - } - else { - Helperjs.readField("album", db, "imageData",login.username,function(albums){ - if (albums[0]) { - var msg = { 'model': photogroupModel,'albums':albums,'firstalbum':0,'foreignPicture': false}; - photoWorker.sendMessage(msg); + //ownimagelist.push(root.login.server+"/api/friendica/photo?scale='0'&photo_id="+fotorectangle.newimages[i].id); } + Imagejs.dataRequest(login,fotorectangle.newimages[0],db,xhr,fotorectangle); }) + // xhr.setLogin(login.username+":"+Qt.atob(login.password)); + // xhr.setImagedir(login.imagestore); + // xhr.setFilelist(ownimagelist); + // xhr.setDownloadtype("picturelist"); + // xhr.getlist(); + newImagesProgress.visible=true } } - } - function deletepics(method, type,id){ + onCurrentimagenoChanged:{ + if(fotorectangle.currentimageno==fotorectangle.newimages.length){ + newImagesProgress.visible=false;showFotos(root.login,""); + fotorectangle.newimages=[];fotorectangle.currentimageno=0 + }else{ + // download next image + Imagejs.dataRequest(login,fotorectangle.newimages[currentimageno],db,xhr,fotorectangle) + } + } + + Connections{ + target:xhr + function onDownloadedjson(type,url,filename,i,jsonObject){ + if(type=="picturelist"){ + fotorectangle.currentimageno=fotorectangle.currentimageno+1 + Imagejs.storeImagedata(login,db,jsonObject,fotorectangle) + } + } + function onDownloaded(type,url,filename,i){ + if(type=="picture"){fotorectangle.currentimageno=fotorectangle.currentimageno+1} + } + function onError(data,url,api,code){ + if(data=="picturelist"){ + var requestid=url.substring(url.lastIndexOf("=")+1); + Imagejs.dataRequest(login,requestid,db,xhr,fotorectangle); + fotorectangle.currentimageno=fotorectangle.currentimageno+1 + } else if (data=="picture"){ + Helperjs.deleteData(root.db,"imageData",root.login.username,function(){ + fotorectangle.currentimageno=fotorectangle.currentimageno+1 + },"link",url) + }else{ + fotorectangle.currentimageno=fotorectangle.currentimageno+1} + } + } + // Connections{ + // target:filesystem + // onError:{print("Error deleting"); + // } + // onSuccess:print("Success deleting"); + // } + + function showFotos(login,friend){ + if(friend=="backButton"){ + if (photoStack.depth > 1){photoStack.pop()} + else if(albumgridview.currentItem==null){rootstack.currentIndex=0} + else if(albumgridview.currentItem.state=='fullscreen'){ + albumgridview.currentItem.state = 'inGrid'} + else if (albumgridview.currentItem.state == 'inGrid'){albumgridview.currentItem.state=''} + else{rootstack.currentIndex=0} + } + else{ + try {photogroupModel.clear()}catch (e){print(e)} + if (friend){ + Imagejs.newRequestFriendsAlbumPictures(login,friend,fotorectangle,function(albums,remoteAuthBool){ + remoteContact=remoteAuthBool; + var msg = {'model': photogroupModel,'albums':albums,'firstalbum':0,'foreignPicture':true,'friend':friend} + photoWorker.sendMessage(msg); + }) + phototabstatusButton.text=friend.screen_name+qsTr("\'s images") + + } + else { + Helperjs.readField("album", db, "imageData",login.username,function(albums){ + if (albums[0]) { + var msg = { 'model': photogroupModel,'albums':albums,'firstalbum':0,'foreignPicture': false}; + photoWorker.sendMessage(msg); + } + }) + } + } + } + + function deletepics(method, type,id){ if(method=="delete"){Imagejs.deleteImage(db,login,type, id,filesystem,root,function(){//showFotos("") })} - } - function updatepic(method,type,id){ + } + function updatepic(method,type,id){ if(method=="update"){ Helperjs.readData(db,"imageData",login.username,function(url){ - photoStack.push( - "qrc:/qml/photoqml/ImageUploadDialog.qml",{"attachImageURLs":[url[0].location+url[0].filename],"imageId":id,"currentAlbum":url[0].album} + photoStack.push( + "qrc:/qml/photoqml/ImageUploadDialog.qml",{"attachImageURLs":[url[0].location+url[0].filename],"imageId":id,"currentAlbum":url[0].album} ) - },"id",id)} - } - - function uploadUrls(urls){ - photoStack.push("qrc:/qml/photoqml/ImageUploadDialog.qml",{"attachImageURLs":urls}) - } - - BlueButton{ - x:mm - y:mm - z:2 - visible: !wideScreen - fontColor: Material.secondaryTextColor//"grey" - border.color: "transparent" - text: "\uf0c9" - font.pointSize: osSettings.bigFontSize - onClicked:{ - leftDrawerAndroid.visible?leftDrawerAndroid.close():leftDrawerAndroid.open()} - } - - LeftDrawerLinux{ - id:leftDrawer - property var newstabstatus: newstab.newstabstatus - visible: wideScreen&&rootstackView.depth<2 - width: visible?osSettings.systemFontSize*15:0 - height: root.height-bar.height - } - - LeftDrawerAndroid{ - id: leftDrawerAndroid - } - - ProgressBar{ - id: newImagesProgress - width: 15*mm - height: updatePhotolist.height - anchors.top: parent.top - anchors.right:uploadPhoto.left - anchors.rightMargin:mm - visible: false - value: fotorectangle.currentimageno/fotorectangle.newimages.length - } - - MButton{ - id: uploadPhoto - anchors.top: parent.top - anchors.topMargin: 0.5*mm - anchors.right:updatePhotolist.left - anchors.rightMargin:mm - text:"\uf0ee" - onClicked: { - photoStack.push("qrc:/qml/photoqml/ImageUploadDialog.qml"); -// var component = Qt.createComponent("qrc:/qml/photoqml/ImageUploadDialog.qml"); -// var imageUpload = component.createObject(fotorectangle); - }} - - MButton{ - id: updatePhotolist - anchors.top: parent.top - anchors.topMargin: 0.5*mm - anchors.right:phototabstatusButton.left - anchors.rightMargin:mm - text:"\uf0ed" - - Menu { - id:photoupdatemenu - width:8*root.fontFactor*osSettings.bigFontSize - MenuItem { - text: qsTr("All Images") - font.pointSize: osSettings.bigFontSize - onTriggered: { - Imagejs.requestList(root.login,root.db, false, fotostab,function(obj){fotorectangle.newimages=obj})} - } - MenuItem { - text: qsTr("Only new") - font.pointSize: osSettings.bigFontSize - onTriggered: { - Imagejs.requestList(root.login,root.db, true,fotostab,function(obj){fotorectangle.newimages=obj})} - } + },"id",id)} } - onClicked: {photoupdatemenu.popup()} - } - MButton{ - id: phototabstatusButton - anchors.top: parent.top - anchors.topMargin: 0.5*mm - anchors.right: parent.right - anchors.rightMargin:2*mm - width: Math.max(8*root.fontFactor*osSettings.bigFontSize,implicitWidth) - text: fotostab.phototabstatus=="Images"?qsTr("Own Images"):fotostab.phototabstatus - Menu { - id:phototabmenu - width: 20*root.fontFactor*osSettings.bigFontSize - MenuItem { - text: qsTr("Own Images") - font.pointSize: osSettings.bigFontSize - onTriggered: { - fotostab.phototabstatus="Images"; - // phototabstatusButton.text=qsTr("Own images"); - showFotos(root.login,"")} - } + function uploadUrls(urls){ + photoStack.push("qrc:/qml/photoqml/ImageUploadDialog.qml",{"attachImageURLs":urls}) } - onClicked: {phototabmenu.popup()} - } + BlueButton{ + x:mm + y:mm + z:2 + visible: !wideScreen + fontColor: Material.secondaryTextColor//"grey" + border.color: "transparent" + text: "\uf0c9" + font.pointSize: osSettings.bigFontSize + onClicked:{ + leftDrawerAndroid.visible?leftDrawerAndroid.close():leftDrawerAndroid.open()} + } - DelegateModel{ - id: visualphotoModel - delegate: PhotogroupComponent{} - model: photogroupModel - } + LeftDrawerLinux{ + id:leftDrawer + property var newstabstatus: newstab.newstabstatus + visible: wideScreen&&rootstackView.depth<2 + width: visible?root.fontFactor*osSettings.systemFontSize*15:0 + height: root.height-bar.height + } - ListModel{ - id: photogroupModel - } + LeftDrawerAndroid{ + id: leftDrawerAndroid + } - GridView { - id: albumgridview - cellWidth: 17*mm - cellHeight: 17*mm - x: leftDrawer.width//mm; - y:8*mm - width: wideScreen&&rootstackView.depth<2?parent.width-leftDrawer.width-mm:parent.width-mm //parent.width-2*mm; - height: parent.height-9*mm - clip: true - model: visualphotoModel.parts.album - footer:Rectangle{ - border.color: Material.backgroundDimColor//"#EEEEEE" - border.width: 1 - width:12*mm - height:6*mm - Text{ - font.pointSize: 0.75*osSettings.systemFontSize - anchors.centerIn: parent - text:qsTr("More") + ProgressBar{ + id: newImagesProgress + width: 15*mm + height: updatePhotolist.height + anchors.top: parent.top + anchors.right:uploadPhoto.left + anchors.rightMargin:mm + visible: false + value: fotorectangle.currentimageno/fotorectangle.newimages.length + } + + MButton{ + id: uploadPhoto + anchors.top: parent.top + anchors.topMargin: 0.5*mm + anchors.right:updatePhotolist.left + anchors.rightMargin:mm + text:"\uf0ee" + onClicked: {photoStack.push("qrc:/qml/photoqml/ImageUploadDialog.qml")} + } + + MButton{ + id: updatePhotolist + anchors.top: parent.top + anchors.topMargin: 0.5*mm + anchors.right:phototabstatusButton.left + anchors.rightMargin:mm + text:"\uf0ed" + + Menu { + id:photoupdatemenu + width:8*root.fontFactor*osSettings.bigFontSize + MenuItem { + text: qsTr("All Images") + font.pointSize: osSettings.bigFontSize + onTriggered: { + Imagejs.requestList(root.login,root.db, false, fotostab,function(obj){fotorectangle.newimages=obj})} + } + MenuItem { + text: qsTr("Only new") + font.pointSize: osSettings.bigFontSize + onTriggered: { + Imagejs.requestList(root.login,root.db, true,fotostab,function(obj){fotorectangle.newimages=obj})} + } } - MouseArea{anchors.fill:parent - onClicked:{//print(photogroupModel.get(0).foreignPicture); - var lastalbum_id=photogroupModel.count-1; - if(photogroupModel.get(photogroupModel.count-1).foreignPicture==true){ - Imagejs.newRequestFriendsAlbumPictures(login,photogroupModel.get(0).friend,fotorectangle,function(albums,remoteAuthBool){ - remoteContact=remoteAuthBool; - var msg = {'model': photogroupModel,'albums':albums,'firstalbum':lastalbum_id+1,'foreignPicture':true,'friend':photogroupModel.get(0).friend} - photoWorker.sendMessage(msg) - }) - } - else{Helperjs.readField("album",root.db, "imageData",root.login.username,function(albums){ - var msg = { 'model': photogroupModel,'albums':albums,'foreignPicture': false,'firstalbum':lastalbum_id+1}; - photoWorker.sendMessage(msg)})} - }}} + onClicked: {photoupdatemenu.popup()} + } + + MButton{ + id: phototabstatusButton + anchors.top: parent.top + anchors.topMargin: 0.5*mm + anchors.right: parent.right + anchors.rightMargin:2*mm + width: Math.max(8*root.fontFactor*osSettings.bigFontSize,implicitWidth) + text: fotostab.phototabstatus=="Images"?qsTr("Own Images"):fotostab.phototabstatus + Menu { + id:phototabmenu + width: 20*root.fontFactor*osSettings.bigFontSize + MenuItem { + text: qsTr("Own Images") + font.pointSize: osSettings.bigFontSize + onTriggered: { + fotostab.phototabstatus="Images"; + // phototabstatusButton.text=qsTr("Own images"); + showFotos(root.login,"")} + } + } + onClicked: {phototabmenu.popup()} + } + + + DelegateModel{ + id: visualphotoModel + delegate: PhotogroupComponent{} + model: photogroupModel + } + + ListModel{ + id: photogroupModel + } + + GridView { + id: albumgridview + cellWidth: 17*mm + cellHeight: 17*mm + x: leftDrawer.width + y:8*mm + width: wideScreen&&rootstackView.depth<2?parent.width-leftDrawer.width-mm:parent.width-mm + height: parent.height-9*mm + clip: true + model: visualphotoModel.parts.album + footer:Rectangle{ + border.color: Material.backgroundDimColor + border.width: 1 + color: Material.dialogColor + width:12*mm + height:6*mm + Text{ + color: Material.primaryTextColor + font.pointSize: 0.75*osSettings.systemFontSize + anchors.centerIn: parent + text:qsTr("More") + } + MouseArea{anchors.fill:parent + onClicked:{ + var lastalbum_id=photogroupModel.count-1; + if(photogroupModel.get(photogroupModel.count-1).foreignPicture==true){ + Imagejs.newRequestFriendsAlbumPictures(login,photogroupModel.get(0).friend,fotorectangle,function(albums,remoteAuthBool){ + remoteContact=remoteAuthBool; + var msg = {'model': photogroupModel,'albums':albums,'firstalbum':lastalbum_id+1,'foreignPicture':true,'friend':photogroupModel.get(0).friend} + photoWorker.sendMessage(msg) + }) + } + else{Helperjs.readField("album",root.db, "imageData",root.login.username,function(albums){ + var msg = { 'model': photogroupModel,'albums':albums,'foreignPicture': false,'firstalbum':lastalbum_id+1}; + photoWorker.sendMessage(msg)})} + }}} + } + + Rectangle { id: photoBackground; color: 'black'; width: parent.width; height: parent.height; opacity: 0; visible: opacity != 0.0 } + + ListView { width: parent.width; height:parent.height; model: visualphotoModel.parts.browser; interactive: false } + + MButton { + id: backButton + text: "\uf057" + x: parent.width - backButton.width - root.fontFactor*osSettings.bigFontSize + y: -backButton.height - root.fontFactor*osSettings.bigFontSize + z:2 + onClicked: {photoBackground.opacity=0} + } + + ListView {anchors.fill: parent; model: visualphotoModel.parts.fullscreen; interactive: false } + WorkerScript{id: photoWorker;source: "qrc:/js/photoworker.js"} + + Component.onCompleted: { + root.fotoSignal.connect(showFotos); + root.uploadSignal.connect(uploadUrls); + root.changeimage.connect(deletepics); + root.changeimage.connect(updatepic); + if (fotostab.phototabstatus=="Images"){showFotos(root.login,"")} + } } - - Rectangle { id: photoBackground; color: 'black'; width: parent.width; height: parent.height; opacity: 0; visible: opacity != 0.0 } - - ListView { width: parent.width; height:parent.height; model: visualphotoModel.parts.browser; interactive: false } - - MButton { - id: backButton - text: "\uf057" - x: parent.width - backButton.width - root.fontFactor*osSettings.bigFontSize - y: -backButton.height - root.fontFactor*osSettings.bigFontSize - z:2 - onClicked: {photoBackground.opacity=0} - } - - ListView {anchors.fill: parent; model: visualphotoModel.parts.fullscreen; interactive: false } - WorkerScript{id: photoWorker;source: "qrc:/js/photoworker.js"} - - Component.onCompleted: { - root.fotoSignal.connect(showFotos); - root.uploadSignal.connect(uploadUrls); - root.changeimage.connect(deletepics); - root.changeimage.connect(updatepic); - if (fotostab.phototabstatus=="Images"){showFotos(root.login,"")} - } - } } diff --git a/source-linux/translations/friendiqa-de.qm b/source-linux/translations/friendiqa-de.qm index 4212bcc5da0ff42fa7a0d296171ad79acde86657..04194122e542def748affca281b6fd3003d55baa 100644 GIT binary patch delta 2075 zcmZvddr*{R6vm%rzxVt02D>aE#O7sLKwuH@LMmSJN{)tj1wzeGcMx6KWU-vIwhL(m z4kqc4nbV{sq9wU%kvf&4sZ&PbC1$#iR$69?w}vsTXM3BbKl)?mw{!Nq=RD`~zWYm+ z?s}DOZFE2^@XQ@Iehi=iP}Tr_7Xcz0aHP0vM7Gk^4O0%#uv&hL}Jh zXoRRyfS%(annNNy5XTPz`d^`Lm<9A(0ria*vKi`jJq2_~+FB)@$Dp?L12Pk#-r_m) z7Rkt$$p8%rtDuDf555cSr)pMs6vN#&0d=orTpb?R@i6VT@xXyW^mF6ESLadKFv)v! zBzu)1uk0XT?ZC7*^$(Bk~wBndK!W75t2~@Boh@>9={F@=!wAljALz*jM*lcJQZ6sKakOY z?cSm6bRo{?{s|2H5P>V{tYnbTJ+piZ1Dp!$Z=VC)yDMya{hL6}y09bukJ##7VdtN! zXMotSOQBhdarz;X_b|`_{pdlbxieqs^Uno=c<8?=e**~HufH<34D^#3ni11m6HYS9A%nvW?(5`xU8HRvW+|Pm~!zdCzu@Aqx|gk z1NZnP<8Ml)pOY2xHe~z%owKo-OHe2%96DEqy|y+am#8 zyBM~ViQEZd(yf8qo$5x?_nwz*(>Oyg}k(H*O5T9gMazsnT)#{l*|COq1ViZR>Q_X5*r30p_!%LF5?HAPH z%^5tOs1`rP-{U$Z<6lze4R^5eYwEGrA3*>qt?J1!bhH*p#>|jR)~jDn{dR?Mo$H(+sC;*+QWjuAQU6J~NGuzR{ei#prm6%FWXyBS%Rl>7#w8)Yj5)^Df!!SWYBKc2W|anKv2jf+6FBmXZ+*;4 zdm4-%EFdGkk&HeonY7l_WAANN-fddY_8He0CeI{RtaX{Zv%1-#^QNk|6WQuQQ_Cif zLLW5kubshNXf(AR`ze&Pef8;k-a?$+i=Uu#x-R7eMD7@zv7FWY_ytZd8nH}G<;yTNS$?pQa zHd^u3e`DIbiuaAD=v59}X4^2TP~>(ubF z+_4O}I@})|$wIy1wXO8O$1NE@pMND+$KGs)WSu(%UKiyMOF@NEdl2T9I&XoHn{EuCyr@sYL;9)dBW0wCLPo3ha z@cYXDCtzKz-5KnNoooyiIC%tozfx+rQ{HmR+e)u=toG5_k1o!|M+cg}mB=Y8MvZJ;jX z*Se6`BE6xN&U`=xAguy=I{`Ttu$6JH2jlG)2qydu<#alb83*My_Zeph zT6}`u#Jy01fd|}y`V$rPKZqfzw|G#lVDuV{**1;yw=iaZ4%a1N{JIJX8!Q;>5{!Ej z6Yt&xlo(8&=?C;{1k=W&^yna<&lHq3z0SBFp=xa#1?w=&<%1W-wOs>P+5{6X!5zX> z_4^s_24G>~3SIPOXEac(r75VSsccF0o1gaFVjU5egKfeBVA_va8`&}wP0<}_0pD{ZKw z0NYh*d)ihC*(4p`QV5u{1S4k(CY4Gj4>P{>taPg63`^7^eU)7W=ypk8c?Z7BrWqt% zxz3U%|0Mn5asxf)2-5udjR(cx0|(9~%MW6e<0h=rn7b zGNe3--G4zDvMYo8`E@7_;B2w7)f-0zOer<#R!}O)#oNFgaKGZY-}&X0fVy z!biso)u;>})V)?sSv(Txm936=ib7251g$3o?O&?}WdYVYQ!t`Z&{3|I?CjtzI;g&U zo~1H+kBNchj-Wk4U3q>QkXxdzHp_IdOkHz&4ok9MUH{KZOkJ3|t)3-FAFS?eWz*$d zR$KdBp<};x-rA*rwpHs(=*tgIs>T2zQ`gR&Pq&=ERL*D2x z?XjXTI>;Bax&`fZ+H(y|oxDu@M<;Jd{BoVGcO+|R)Y)DQD(@y}$rns?=_XX&<3Tlo zv39}KFLhJDS;*T^s(YsHGL0SA)dbgNOx7*;e!%;$AKNuRLcMNP8w1-G>E8L24twV5 zKCUFq8wDdf1d|TwyY2pmjsyD2)1R|zp?8j>Q|;^rysmdm`HLC)USIc~gQ+gox2|U? zG=BZQhDq#!P5QR>KlxpGT;F!(PdZE9VL)>RYgH~7@rIzI!65f~hRs%Cm~KDA9(c_# z^E?A+vka>=xA-MnXlOkAJDqeI)_rk4GtfA21-8VlwBYM(_Z;xvV9O8T?u>$|9I_%e-k6dkSaG zJ8a#k*wAj?5oCBkFfp;3-}ijKL!Bjg!!QX>JdYYwqZUqWFyl(_H+rtK*5eNTa~ejK zyPUO^<CalendarTab Events - Termine + Termine Own Calendar - Eigener Kalender + Eigener Kalender @@ -393,7 +393,7 @@ Connect - Kontaktanfrage + Kontaktanfrage Approve @@ -440,6 +440,21 @@ Netzwerk-Fehler + + ContactsSearchPage + + Network Error + Netzwerk-Fehler + + + Forum + Forum + + + Person + Person + + Conversation @@ -596,7 +611,7 @@ EventListItem Location - Ort + Ort @@ -912,7 +927,7 @@ Reply - Antworten + Antworten DM @@ -950,6 +965,14 @@ Delete Löschen + + Bookmark + Markieren + + + External + Webseite + PermissionDialog diff --git a/source-linux/translations/friendiqa-es.qm b/source-linux/translations/friendiqa-es.qm index 25d1fab1512307563000475c1cc7c911dc9d329f..ecfce5c2954b64579cba8932347772d45160cd53 100644 GIT binary patch delta 2061 zcmZvdc~F#P9LK-QzSrKc%Oyv-uBgBYf{=>Dm?RjcGHM=JDdL95$`-q7Wx1(19^l|e zd0%-Dh?TW!;+cx)j7QUic9@Q4S&m1UI*p_DrKf3{ra#{Kyzg(H=XZU7&$IPax>Z%W z#gReT;~&#+XkS1DAT0tq{Q}6@K-^8*1_Q|>1#=3?oxoEs0VQ6*7!-8(1j;W0U5*2j z7SPUpZ46&8=o|&iNCDdWf#6~Kn<1Fvh15_@C(oLtZycZp)~3NQ;cBvNkQjKC}+C@Y2QG($9<+R z1S95=K^i)^p|&~h(E|0yYF0QOxv6&Wi9x{A09eWe9UTQ-^$47}17v)L;4b>H?GlW7TQKPyHmZJhU<4Yy zy?~yHxKi*K=sp?2TW(g;y;(Qw^^HJgAS}a9eG}dYYh1no$XOD0#Q!;<&kMUUb2(ew z9Cp1;YdN6rIcPf_E!IDi^%c;0xPI{E5YTR~{z3(H54)hhRWyeZtr3iB(m&Ml0Bcu4 z#|^=bV}p`>k{d0Vg7%w&uBnn^;2j|9u@t+5iM3xTW&fmO$Lpou`m+q!Dy^+z;P^$- zR`+Ipca~0W8pHs#f|1379rsJ8hkpquUa7TvIbcYZT6=y#NgAYUx2a&KV2<>&*U!u| z1mpGzCZCfY4QJ~Oqh-ZGDN^pp>SGt#UpD-@7BE)|+EWEP9F)W3v)Rcw*=>&ibl2tH zuQ5={Zh64H?wlEm>|Mzj3irr0rcF%XIk{#U8SIiMFK?<~pjyGyW_i_owmLRJ-dfEC z-4f+(TR2q8PWfm9D|NpjAIlC^t57W{xkLLBK}WHm>y$eD#V(nNu3yNvgP7DrO znMpHWNV{LqC23#PvW4$)WQJq4nzGxR+`Xa z*gc-KJ`jxDCz#a97`@{GE8k%pfA$o|7)H+kR;=|ldPo1kV>;JZ^JL z1NEM1k^U~(-?aS5O;)nfwBpRKbhylPG?R%Z&M><+&jF&>nA5-ho)s6GpC0rHXC=Wr zcr*9)7-k+blK&?emF7J?Bg`PFrq|n0fUTUg_0{Bn~pVroOg^yg| ztDHJT<(oa5}a9JP`ptKD5Vl#v1oe X46Wbm0Z(N`skiQM+Ne-*daM0UF8dQD delta 2056 zcmZXUdr(wm7{;Gv&)KtA7M6<$sK5dW%S{9WGKZwlv|vVs95NGiC2d7fo zT=ROM>f>}z02Bby1|aq>Ag2RiN!-f^;^qrx6_6hRW1j(vT!1ML-9i2XtGT$yv}fY8gO>pkJF{jc#(7nA|R_k9hen-Ptz#yH0jqQR7X3S{K1V-LLQNtz*P*76c0wgqJvC9h;=8py!@ZT#KwFzzwQYF=9L4v@OWXSD4}AiUY9vF2^oXsgdL_h*21yw80??_S)pNJU>D(s8QReA5Q_@ zf&smx%8lr)l6;aEExm%aUj^;^rGUq706~3H$bJSG@tu_Zvxb@9C*7~@pyNGKT{!~? zYnOH<)blw*I{9uMV4Wlwm?s$BFP%C@`_h}z>B2KC(N*c(m=eIyDVJv7nhp~k_AKi1mn7-{z8_*7%1xkSQ>{$R{pjF@rAPCIy>Fs5VXY!+BLFYSUNL1 zN=~r(1Dam>{xbTBZX3AlPgW{(yx!KRxaaWltZrBSxN_!1cx3JbhOHwUuNn< zLgif*JeT5-_v|>#=FE_fH&AhcM{Z5`uw-lH-zy5(17mge$pJuGj4q{tN=M(-jVq1; zlIwNj_Hd+=yLCmY_&#KdVCY6w*Y@UY2CzhTdIAsl#R&$b3dWq#U6{*skl4~NFT0jw90JC4CRfEXIT=DvgPgz+&`u4tYiriep3!Kv+1(hmFAQl zDqgQ&UcHXv^{3t&8OL7H>UUiEiOu_#{)5wLthH0nk*z;m*+v1c>06U2NFDNx{zSen z6)Y9Bl?mD((x0tj>f{6ZKRP)j5e0^@k%6pbh#~CNfygHa`i~Qg8fAE_q@Rwq35F|z zj+YEie!H5}u*NXAyo&-h8Ws(lOB!KVukPji8($t=AhOV~p@oLSrWv+>PKCoH!@+r^ zb)R71A;FmW#^C+@Os5?+&g*Dr*TU$WLZ$k{f`%lc>xn-(u3lsL?r5eu&e*(#rO?>Dye+@Z4AY!e!jSgVzS0jgkhrb!+#m*cX@G~0fLJut(x@G=eP zSC}?vZ?Oqanre<+rIH3y?U&bSu-&wxGTZCd0>PWj$>)Ed;sWync^|S@W}5Ts zdGEeC=BH-NU~{fEAJV99UUGfskOeH!=6H?_5HA5 zMr``a`u+g@ZV5(qFJNc&H$^MkB-IxWV;P(%g$Ik_)(>P{H}HFSnX}a6R=70f6uX?I z^NN>FFP@{(aw7^kD28kB);zA3Vgc_)U AccountPage - - - + + + User Usuario @@ -15,17 +15,17 @@ Servidor - + Nickname Usuario - + Password Contraseña - + Image dir. Dir. de imágenes @@ -34,54 +34,54 @@ Noticias como - - - + + + Error Error - + Nicknames containing @ symbol currently not supported No se admiten los apodos que contienen el símbolo @ actualmente - + Confirm Confirmar - + No server given! ¡Servidor no encontrado! - + No nickname given! ¡Usuario incorrecto! - + No password given! ¡Contraseña incorrecta! - + No image directory given! ¡No se ha encontrado el directorio de imágenes! - + Wrong password! ¡Contraseña incorrecta! - + Success éxito! - + Name Nombre @@ -97,14 +97,12 @@ CalendarTab - Events - Eventos + Eventos - Own Calendar - Calendario propio + Calendario propio @@ -333,166 +331,183 @@ ContactPage - + seconds Segundos - + minute Minuto - + minutes Minutos - + hour Hora - + hours Horas - + day Dia - + days Dias - + month Mes - + months Meses - + years Años - + likes this. le gusta esto. - + like this. me gusta esto. - + doesn't like this. no de ése. - + don't like this. no me gusta. - + will attend. asistirá. - + persons will attend. Personas que asistirán. - + will not attend. no asistirá. - + persons will not attend. Personas que no asistirán. - + may attend. Puede asistir. - + persons may attend. Personas que pueden asistir. - Connect - Conectar + Conectar - + Approve Aprobar - + Reject Rechazar - + Ignore Ignorar - + Follow Seguir - + Unfollow Dejar de seguir - + Description Descripción - + Location Localización - + Posts Mensajes - + URL URL - + Created at Creado en - + Network Error Fallo de red + + ContactsSearchPage + + + Network Error + Fallo de red + + + + Forum + Foro + + + + Person + Persona + + Conversation @@ -682,9 +697,8 @@ EventListItem - Location - Localización + Localización @@ -695,7 +709,7 @@ Solicitudes de contacto - + Friends Amigos @@ -785,40 +799,40 @@ MessageSend - + to: a: - + Title (optional) Título (opcional) - + Drop your Content here. Deje caer su contenido aquí. - + What's on your mind? ¿Qué tienes en mente? - - + + Error Error - + Only one attachment supported at the moment. Remove other attachment first! Solo se admite adjuntar un solo archivo en este momento. ¡Elimine y deje un archivo adjunto! - + No receiver supplied! No se ha suministrado ningún receptor! @@ -834,12 +848,12 @@ NewsStack - + Network Error Fallo de red - + More Mas @@ -1002,17 +1016,17 @@ Asistiendo: - + Source: Fuente: - + Direct Message Mensaje directo - + In reply to En respuesta a @@ -1026,75 +1040,86 @@ asistencia - + ago hace - + Attending: Asistiendo: - Reply - Respuesta + Respuesta - + DM Mensaje directo - + Repost Volver a publicar - + Success! éxito! - + Conversation Conversación - + + Bookmark + marca + + + Attending Asistiendo - + yes si - + maybe quizás - + no no - + Delete Borrar + + + External + sitio web + PermissionDialog - + + Friends Amigos - + + Groups Grupos @@ -1102,28 +1127,28 @@ PhotoTab - + 's images s Imágenes - + All Images Todas las imagenes - + Only new Solo nueva - - + + Own Images Mis imágenes - + More Mas @@ -1447,14 +1472,14 @@ Salida - + Background Sync Rightclick or Middleclick to Quit Sincronización de fondo Haga clic con el botón derecho del ratón o con el botón central para salir. - + Click to open Friendiqa Haga clic para abrir Friendiqa @@ -1572,12 +1597,12 @@ Haga clic con el botón derecho del ratón o con el botón central para salir.La configuración del tipo de vista de las noticias se ha movido de la página de la cuenta a la página de configuración. - + Undefined Array Error - + JSON status Error diff --git a/source-linux/translations/friendiqa-hu.qm b/source-linux/translations/friendiqa-hu.qm index 690bead3a9df7d5de16b7e8a17e69cef2733498f..05e37cd745b84393fb2df34c934f64f8c7727547 100644 GIT binary patch delta 2190 zcmZvddsLKl8pprGyqCGpFo4L#WEc>+gNT9}i59tRrU(;?18mG_)|PJtoXrKp z!@KLDmi1Wb2FR}L&dN&Ko-Sb6o($Kr?XoSUw6^W3$jhFNN9#NL+f(Q4=?~85<(cPw ze$V%LzQ36REruss411zAdGodn%hoOdQ~=U$V3r?{3xW7OjFkhk2L+3LG1S98@8UvmYsNur%K7{&7I~8_eQRWpuX%URQg4++@$M`62KQWiQ zjys;-#KvwGOz07uu?s7=ya+fotiFDkQ+x#X)Q13bw_xTxRQ3LX0t~3zI|5{WgeJ|e zv!f$u3Nvz(pyyu*7&xljR}tvsL}s@N7SBh}*9+Lqg6>xYy;%sJx&-7+LOaGf&I-Yp zSi#gv98d#5_M_p5zBL|^xFK=Dw- zXy7G|+7xkqXE#SY74cbk*K&%nXw@HC=(MqPF84X>&&KkPLqOansf?&!5>2$?et`gF@0vgx!C+S?#^YloG zbn#1WFjX6pKJ^EH>1PDvD+SXRN;fJvdedjJ62(jBD@%;YJ2L zf|&;SS5I=(u|x7eI}>sX<-vZMO1V`&*-NFF2j$lagH-;e{AK%E?tHc4T^EO4Uw&KD|gV?xM13Q391;R>pq45gO7?D5sY&(P6Khl|M?3vZG-8^>A8$A5zKhP^kT;t zC!1$_Eti5~gQipEnu7{9@PTy42qr&edb^V&lqO7Hear@DYUYHrXztWvPWXAa^Fl$_ zCxV_G=9P6fc+g{l2^$16M$PO0_84!&GILGqBn5Pt8^U?nrRJY$f8fgRBEt{Pqau*> zjCuD64~Rc%{>{r&npkUop_X*)7K~mYn9^gJcJvyRk6LQS-=K|Q@vWd@b=2a&_iIjQ z*wXsj6plLIGTg&e7@xHq@4TB{+HM&c`wzcQ?y!tpBvW@Wt3OY+hUbx z*6^Mmvu^aBr3Y%Q^%E?hHd}Wauh5Jm*6z{IspO>f={Ki%9jB}(=dke^UYqw&3q3O5 zmiz99R9tDhdDZV3AF`Dn;(PNNZ5!6DqiOfsjvE3L_T5XeyAK=JccG*eS z=U=mzT;9ifoo(Mzwv^ukQ}#fpghK1>og>Vj-X<6~AQw7@Sr84o>c* zV04>c${FW#OX(@RoBe&X~}@9q9&rG(TI{T&v~q0fEpt*RYap!Tqe-jBRKzh4-xRPcCa}-qxV< z$-T6xF<4y_46N~0H`i>|*G1m4{QqKiR@eCqM&>&HcWwiV`|;3s)s#DZ&4H%IA1e2f zJ5C>Tn?ldW+RUNJq%IpT!B!5S5f5QI>M6pHhYfdqSIV@cscCCNb@Nu;m;Jfdg$J3z fUo>Xbq8k41^KRP_^ffnD`}NYC%FtNO`|fW6u?IC8 delta 2216 zcmZvddvH|c8OEQ@p37d&W-r-5$b#8q6ESyg5rV)#Qo=KuycQu znLB{0zjELAfZ%hqZxD0^1(PQO8!`ZYI$->k`>qM*w?S&z#RkIIatN1_T4oqwW;TI@%25a2Rk+6O1nuOnV#6 zst#oDLTiXZ#_Q-Wx&w@9#aCHn1{XI>&py@607qg*dzP`(D`Hxk_5t~y#B}TLv(%QD z{*6rx;EefuwAb=M^MrYCG0>OhY2(gtX8O%V^E{lN7tO^Nnfb8y&7aop1!7vwU(K$k z{fuCIjro>k3J`l(Fs_3%Xh|xFwkQwqW`r((T1;g|$~!;@Fyua#_6-0Mbv&*01+a zxGLzrC7ANM?DFNYvQNla9yeh6v;5GLJSQVde)#5C&Qhk_z(IxWm~1qxf0bIPRl9Qu2dl8tlXPRKjmzFb)ES(&*{No~TNz$iQ-$*ZeX|wvCk1F>I zx;=u)z1F!^w|USCLEllqjDG8~vp?o-m}xEF{5cb7x7I}WWiPk>#P~Juziras0{(wm zw|6nHFV6bQ518TbfQMZ*4<5zGKGywu;lg=hVVh`7krJ=y!S57JBqw ztk55An_o|5sf%r$yV(l!tG0I<7jg!6*t$-B!|zJa)^+I{W|nr|j@BIZYJp%}v0$Lj zE+>_9*yh+D4}8oS*kli0U;vBXzTJF-U$T(Bse6E#d}e?74_`B&)BfQYCNSbzEwI0y zGg7YQp8E?kUZ+i-cZjp%)r$Ai@4*Ib`I03Z)??Z`CPSygMD0Q%6%J|FKA-v|@2Sfn zJ2~xRhB>BO-@|J;-%(vu$oC^0dSnU{4mujUxIf{LV503V4Z(Dub7E#34@h#Bw8gT5 zhXlQMnU?F^SIC*dC(bu~L#Wu^<9s7Z*L#A=TdO%)n AccountPage - - - + + + User Felhasználó @@ -15,17 +15,17 @@ Kiszolgáló - + Nickname Becenév - + Password Jelszó - + Image dir. Képkönyvtár @@ -34,54 +34,54 @@ Hírek mint - - - + + + Error Hiba - + Nicknames containing @ symbol currently not supported A @ szimbólumot tartalmazó becenevek jelenleg nem támogatottak - + Confirm Megerősítés - + No server given! Nincs kiszolgáló megadva! - + No nickname given! Nincs becenév megadva! - + No password given! Nincs jelszó megadva! - + No image directory given! Nincs képkönyvtár megadva! - + Wrong password! Hibás jelszó! - + Success Sikeres - + Name Név @@ -97,14 +97,12 @@ CalendarTab - Events - Események + Események - Own Calendar - Saját naptár + Saját naptár @@ -140,22 +138,22 @@ Dark Mode - Tervezés + Sötét mód System - Szabványos kivitel + Rendszer Dark - Sötét design + Sötét Light - Fényes design + Világos @@ -193,7 +191,7 @@ Start - Indítsd el + Indítás @@ -349,166 +347,183 @@ ContactPage - + seconds másodperc - + minute perc - + minutes perc - + hour óra - + hours óra - + day nap - + days nap - + month hónap - + months hónap - + years év - + likes this. kedveli ezt. - + like this. kedveli ezt. - + doesn't like this. nem kedveli ezt. - + don't like this. nem kedveli ezt. - + will attend. részt vesz. - + persons will attend. személy részt vesz. - + will not attend. nem vesz részt. - + persons will not attend. személy nem vesz részt. - + may attend. talán részt vesz. - + persons may attend. személy talán részt vesz. - Connect - Kapcsolódás + Kapcsolódás - + Approve Jóváhagyás - + Reject Visszautasítás - + Ignore Mellőzés - + Follow - Kövesse + Követés - + Unfollow Követés megszüntetése - + Description Leírás - + Location Hely - + Posts Bejegyzések - + URL URL - + Created at Létrehozva - + Network Error Hálózati hiba + + ContactsSearchPage + + + Network Error + Hálózati hiba + + + + Forum + fórum + + + + Person + személy + + Conversation @@ -698,9 +713,8 @@ EventListItem - Location - Hely + Hely @@ -711,7 +725,7 @@ Barátkérések - + Friends Ismerősök @@ -812,40 +826,40 @@ MessageSend - + to: címzett: - + Title (optional) Cím (elhagyható) - + Drop your Content here. Ejtse ide a tartalmat. - + What's on your mind? Mire gondol? - - + + Error Hiba - + Only one attachment supported at the moment. Remove other attachment first! Csak egyetlen melléklet támogatott jelenleg. Először távolítsa el a másik mellékletet. - + No receiver supplied! Nincs fogadó megadva! @@ -861,12 +875,12 @@ NewsStack - + Network Error Hálózati hiba - + More Több @@ -1033,17 +1047,17 @@ részvétel: - + Source: Forrás: - + Direct Message Közvetlen üzenet - + In reply to Válaszul erre: @@ -1057,75 +1071,86 @@ részvétel - + ago óta - + Attending: Részvétel: - Reply - Válasz + Válasz - + DM DM - + Repost Újraküldés - + Success! Sikeres! - + Conversation Beszélgetés - + + Bookmark + könyvjelző + + + Attending Részvétel - + yes igen - + maybe talán - + no nem - + Delete Törlés + + + External + weboldal + PermissionDialog - + + Friends Ismerősök - + + Groups Csoportok @@ -1133,28 +1158,28 @@ PhotoTab - + 's images képei - + All Images Összes kép - + Only new Csak újak - - + + Own Images Saját képek - + More Több @@ -1478,14 +1503,14 @@ Kilépés - + Background Sync Rightclick or Middleclick to Quit Háttérszinkronizálás Kilépéshez kattintson a jobb gombbal vagy középső gombbal - + Click to open Friendiqa Kattintson a Friendiqa megnyitásához @@ -1603,12 +1628,12 @@ Kilépéshez kattintson a jobb gombbal vagy középső gombbal A hírek nézettípusának beállítása át lett helyezve a fiókoldalról a beállítási oldalra. - + Undefined Array Error Meghatározatlan tömbhiba - + JSON status Error JSON-állapothiba diff --git a/source-linux/translations/friendiqa-it.qm b/source-linux/translations/friendiqa-it.qm index bfff3d67a389794a013bf462b18ab6e773b48357..8928dd41b39210279163f3455cef42bb9204fca3 100644 GIT binary patch delta 2074 zcmZvdc~I147{|ZM{*Jw1mt8;t4`4y%Mg&nLM`eP<`))9^RS7X))4D{a$%zuma zc0o(EU}QY7G!BRu0eHS!4n#Vu$(2ith%LZo$w|$ldz_?X}1~oJM|*G3#fuunfWQUj=*pg0V%P z0p^pK^zbgH*n;Wvy_|@jVEhT>H@?jVmZET73kxrW(^Fi}in`(SF|bK6Y7kr+jw)pa zT(z7?ECh#~gS(&+@Xr;r=>+Wy;Xd943@C-?5aXCP3kDYo#_Ym&)x`;zvAcK(>%NK3 zoX5aGJ3KcN*vY^}n&peP1F0!~1FSPS>KT5!8@2(N`F`KHz5ujYex1u2IN~LKH+;L6 zOSFT>eFzMmpdFFc2J}nPj=$&yp4z9qP(mH}wP|nWRd7Wc1%uaWAL@ny0fBkoqV5t40e7Z7|^3jK(MMa+}ZuWEoH3#FmjRwitcHm_jf@FHnn!cL0z zfplWWI3_3+3>qXDy-GSY?F?7>lGHx15YYFK+6V9AN*bhVx46N+9!a`h>|*781jDuq z#vYU&P2=eGqh-a$Rm2^Y)yH1ohGEpN7LP0kzKx3HI*7^SL}HX=JAZb}3no7@nJ`WHlv`tCjp^ zd>&dS7?!2X&I)Je!<1w1ya*5a$0?^q($PFgFgQ#wW|ne3kGCV~OI16$o+7-W1}8CL zk2p2%4c_J6mFn>4S&-?Xp!HoryG_l>@8U|`g0?||_VwztgJ&teeD$>suF4eQBkzCU zd0~i}saADxL}{nhHD;NeTvFGzF5+tDs+%6X$`P(s_f~Ti30u@d%~pzYrP`cwjs6+B z@^zJf&Y`Q1sZite-OV{BlR?r1U_>hZ1a_;^nMD_PGk zq;E*O|87lRLpV+a{^z^v*sTHef{7#6C1Y?(&GvjUSw91^nCxD{13I?4OjIo=yWm8kQXx>+MnD3F^ zOU(yDSh+D>(DIvL$NDH96H zT+WjJ3Focr5v%uhMXWJVkdt}1(035UD8g(8ay|*68|ieuyueZRve%UuqOn`(Tm(1s dM4+6%wl&zS&5^#zC3CA2gygQe*v|a68-=H delta 2051 zcmZvdX-t$?6o%j7+h%2kVRaA$MpTAPkVTPNkOHlWG}bD?y0C>}SSm9vP1Uc8+A0`Z z#|5KB<5B@pv7;755*HLOiZlj;X={mFZEGtEVjH9OjMw_BKPJ!3oqO&%=f3Zmxm}^S zSfTjJLv|^$O$HC!=crgOh}-4>Vdo+4X(kRqtmCMFBaDXqjDgD_c83EIOCSzWoYuzZ zR>CL;MMH949KRgWJ*p@!35lW3ZVMTGqL6-Q9_=qi`so zARxwJ_Cg1sKExQ>h^+Pr!00+;*KVPE|3u-oHY#{F%8Kofp{;qffLk?VP!_BTdaAL> zux_Fk8FPluJcbh*8>B*66) zqkAh+rj3#B^TH(x)U`4iPcxeHc=wC}!1F5abAk#C*ucmBssJX;;wN(5lsKQSSwjW* zR`LyD2gtm4_)Ghz19}sqhd<-U2LAE|x}V?4cg?y+67}-e#}xvqGyHXV{6R8JGJn6H zBpo%1|E<_c9Y~C(3ydLK`4_WD3e}(>x|1}P!-DkEOymXCqZ%q)U^FTigT5CGzOnS8 zO+uK_4NwdS6Bkh)i%pn1G!BUE6sk1)$s>J&T(yK2qkj~t50%n}g>l#x#!#!U^GkYq z?;)X~lFmgo3yt-yWFnJrv6eax^AXx(Z6sN$&|mo>dFHfep5jiDwuobEsne*9Vq#7( z#l?$>jS)nfn7xv|_gThhnkS1L-z*@L8N{y1bU^=%(bI)7c$N6m6dId|gA(_Fo#ywl z> zKjqSGYw7pln$jK^0*pAOtiOGS%)3*0v@3?BOJTG;P_|ZePy^-4_DE_-_CBuc%ygv= zCNmn}W(?|A_H3f36ZR?}-=ZlA5LCXSJxEJ0mG1^;cgY1PGZ{-FdR>NST)(ht@T>gHV}1$Rx| zvS}uH;BR$X$5WELUfp*8DRmb7ScAF<(rPNBdj_NVu0|MjYtjl6M_3Voz~Yx*(rN{lx1 z0L8_twez#GNLquoMIl=$;2mwBi7NE!(B4g2M01*^6ZGWv=*7B8gEcgk3v@+kDfE4) z&gz&%4S%fL)JErh&NG@Uuep^mWWGKj)Saebkv_ZLm0qxg(c>&*aH@W93V8~*^hbQX zsAA1c{ShY(J&b|-i^y3uj*-%CUe+QNOHhDP*ifW&zPIT7q%J8awOO72o0^oI;)2rr zobs7DxeAUpJdlDM6u*ker&T$MQ1&KLo4K?!;J=XnjW;pT7We2k7e-u+7ZiRjU;x>v AccountPage - - - + + + User Utente @@ -15,17 +15,17 @@ Server - + Nickname Utente - + Password Password - + Image dir. Directory immagini @@ -34,54 +34,54 @@ News come - - - + + + Error Errore - + Nicknames containing @ symbol currently not supported I soprannomi contenenti il simbolo @ attualmente non sono supportati - + Confirm Conferma - + No server given! Nessun server inserito! - + No nickname given! Nessun utente inserito! - + No password given! Nessuna password inserita! - + No image directory given! Nessuna directory immagini inserita! - + Wrong password! Password sbagliata! - + Success Ha funzionato! - + Name Nome @@ -97,14 +97,12 @@ CalendarTab - Events - Eventi + Eventi - Own Calendar - Calendario + Calendario @@ -321,166 +319,183 @@ ContactPage - + seconds secondi - + minute minuti - + minutes minuti - + hour ora - + hours ore - + day giorno - + days giorni - + month mese - + months mesi - + years anni - + likes this. mi piace. - + like this. mi piace. - + doesn't like this. non mi piace. - + don't like this. non mi piace. - + will attend. attendere. - + persons will attend. Persone che attendono. - + will not attend. non aspettare. - + persons will not attend. Persone che non aspettano. - + may attend. puoi attendere. - + persons may attend. Persone che possono attendere. - Connect - Connetti + Connetti - + Approve Approvare - + Reject Rifiutare - + Ignore Ignorare - + Follow Seguire - + Unfollow Non seguire - + Description Descrizione - + Location Località - + Posts Messaggi - + URL URL - + Created at Creato il - + Network Error Errore di rete + + ContactsSearchPage + + + Network Error + Errore di rete + + + + Forum + Forum + + + + Person + Persona + + Conversation @@ -670,9 +685,8 @@ EventListItem - Location - Località + Località @@ -683,7 +697,7 @@ Richieste di contatto - + Friends Amici @@ -773,40 +787,40 @@ MessageSend - + to: a: - + Title (optional) Titolo (opzionale) - + Drop your Content here. Lascia qui il tuo contenuto. - + What's on your mind? A cosa stai pensando? - - + + Error Errore - + Only one attachment supported at the moment. Remove other attachment first! Solo un allegato è attualmente supportato. Rimuovere prima gli altri allegati! - + No receiver supplied! Nessun ricevitore in dotazione! @@ -822,12 +836,12 @@ NewsStack - + Network Error Errore di rete - + More Ancora @@ -978,17 +992,17 @@ attendere: - + Source: Codice: - + Direct Message Messaggio diretto - + In reply to In risposta a @@ -1002,75 +1016,86 @@ partecipare - + ago fa - + Attending: Attendi: - Reply - Risposta + Risposta - + DM Messaggio diretto - + Repost Condividi - + Success! Ha funzionato! - + Conversation Conversazione - + + Bookmark + Segnalibro + + + Attending Attendi - + yes si - + maybe potrebbe - + no no - + Delete Cancella + + + External + Sito web + PermissionDialog - + + Friends Amici - + + Groups Gruppi @@ -1078,28 +1103,28 @@ PhotoTab - + 's images Immagini - + All Images Tutte immagini - + Only new Solo nuovo - - + + Own Images Mie immagini - + More Ancora @@ -1423,14 +1448,14 @@ Chiudi - + Background Sync Rightclick or Middleclick to Quit Sincronizzazione dello sfondo Fare clic con il tasto destro del mouse o con il tasto centrale per uscire - + Click to open Friendiqa Clicca per aprire Friendiqa @@ -1552,12 +1577,12 @@ Fare clic con il tasto destro del mouse o con il tasto centrale per uscireL'impostazione del tipo di visualizzazione delle notizie è stata spostata dalla pagina del conto alla pagina di configurazione. - + Undefined Array Error - + JSON status Error