diff --git a/CHANGELOG.md b/CHANGELOG.md index 00efe7b..ad9982e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -91,7 +91,16 @@ ## v0.3.3 ## -* Update for OpenSSL and Qt -* Experimental support for Peertube (links are expanded for video widget) -* Some unicode emojis +* Update for OpenSSL and At +* Experimental support for Peertube (links are expanded to video widget) +* Some Unicode emojis * Redesign of contact details (click on contact opens in new stack and shows last news) + + +## v0.3.4 ## +* Direct message creation from profile page works again +* Profile image upload works again +* Viewing private album pictures of contacts works again +* On first start servername from https://dir.friendica.social/servers/surprise selected +* Register button opens webview of registration page on server + diff --git a/PrivacyPolicy.md b/PrivacyPolicy.md index 3346069..c15eb20 100644 --- a/PrivacyPolicy.md +++ b/PrivacyPolicy.md @@ -5,5 +5,5 @@ You have probably selected Friendica as your preferred social network because yo Storing some pieces of user data on the device is necessary for some app features, other apps on your device may not access this data (keeping app’s own database storage protected from other apps is guaranteed by Android). The app has been programmed so that stored information contain any personal data (only login data and id number of last seen post will be transferred to servers). Photos from the albums and contact images are stored in a public directory on the device. Other apps may access these files and the Friendiqa needs access to this directory. To send images from the Android gallery the app needs access to picture databases on the device. - This app don’t collect any usage statistics. In addition, no information is sent from your Smartphone to me as a developer or to a website associated with me. +On first start, the website https://dir.friendica.social/servers/surprise is contacted and the selected server shown in the app. diff --git a/source-android/android/AndroidManifest.xml b/source-android/android/AndroidManifest.xml index f9258a6..713a51d 100644 --- a/source-android/android/AndroidManifest.xml +++ b/source-android/android/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/source-android/application.qrc b/source-android/application.qrc index 3f6862f..d890962 100644 --- a/source-android/application.qrc +++ b/source-android/application.qrc @@ -223,5 +223,7 @@ qml/newsqml/NewsImage.qml qml/newsqml/NewsVideo.qml qml/newsqml/ContactPage.qml + qml/newsqml/NewsLink.qml + qml/configqml/RegisterPage.qml diff --git a/source-android/friendiqa.pro b/source-android/friendiqa.pro index edafe5c..1eabae6 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 +QT += qml quick gui widgets androidextras sql webview include(androidnative.pri/androidnative.pri) diff --git a/source-android/js/friendworker.js b/source-android/js/friendworker.js index ab6fdf4..1d30709 100644 --- a/source-android/js/friendworker.js +++ b/source-android/js/friendworker.js @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify diff --git a/source-android/js/helper.js b/source-android/js/helper.js index 956139b..ac113d1 100644 --- a/source-android/js/helper.js +++ b/source-android/js/helper.js @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify @@ -151,7 +151,7 @@ var where = " AND "+ filter +" = '" + filtervalue+"'"; }); } -function showMessage(header,message,rootwindow){ +function showMessage(header,message,rootwindow){print(message); var cleanmessage=message.replace(/"/g,"-"); if(cleanmessage.length>200){cleanmessage=cleanmessage.slice(0,200)+'...'} var messageString='import QtQuick 2.0; import QtQuick.Dialogs 1.2; MessageDialog{ visible: true; title:"'+header+'";standardButtons: StandardButton.Ok; text:" '+cleanmessage+'"}'; diff --git a/source-android/js/image.js b/source-android/js/image.js index 1cfc09e..9a91d09 100644 --- a/source-android/js/image.js +++ b/source-android/js/image.js @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify @@ -175,7 +175,6 @@ function deleteContacts(database,user,callback) { // does nothing useful at the function newRequestFriendsAlbumPictures(login,friend,rootwindow,callback){ // screenscraping of albums page of contact with remoteAuth Helperjs.friendicaRemoteAuthRequest(login,friend.url.replace("profile","photos"),friend.url,rootwindow,function(photohtml){ - //print("Photohtml: "+photohtml); try {var obj=JSON.parse(photohtml); if (obj.hasOwnProperty('status')){ Helperjs.friendicaWebRequest(friend.url.replace("profile","photos"),rootwindow,function(photohtml){ diff --git a/source-android/js/layout.js b/source-android/js/layout.js index 77445e4..bdc27b3 100644 --- a/source-android/js/layout.js +++ b/source-android/js/layout.js @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify diff --git a/source-android/js/news.js b/source-android/js/news.js index 7f2d68f..2b266fe 100644 --- a/source-android/js/news.js +++ b/source-android/js/news.js @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify @@ -465,7 +465,7 @@ function chatsfromdb(database,user,callback,stop_time){ helpernews.statusnet_html=Qt.atob(helpernews.statusnet_html); helpernews.text=Qt.atob(helpernews.text); helpernews.id=helpernews.status_id; - if (helpernews.attachments!==null){helpernews.attachments=JSON.parse(Qt.atob(helpernews.attachments))}; + if (helpernews.attachments!==null){print(Qt.atob(helpernews.attachments));helpernews.attachments=JSON.parse(Qt.atob(helpernews.attachments))}; newsArray.push(helpernews); } callback(newsArray); diff --git a/source-android/js/newsworker.js b/source-android/js/newsworker.js index 9df6a3b..f84d00f 100644 --- a/source-android/js/newsworker.js +++ b/source-android/js/newsworker.js @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify @@ -31,7 +31,7 @@ function findend (text, startpos) { var indexOf = text.substring(startpos || 0).search(/\s/); - return (indexOf >= 0) ? (indexOf + (startpos || 0)) : indexOf; + return (indexOf >= 0) ? (indexOf + (startpos || 0)) : text.length; } @@ -135,6 +135,20 @@ else{ if ((attachmentList.length==0) || (attachmentList[attachmentList.length-1].url!=ptvideohelper.url)){attachmentList.push(ptvideohelper)} } } +// if (newsitemobject.text.indexOf(".html")>-1){ +// //print("message "+msg.options.showWebsiteForLinks); +// if (msg.options.showWebsiteForLinks!="false"){ +// var linkhelper={mimetype:"text/html"} +// var linktext=newsitemobject.text; +// while (linktext.indexOf(".html")>-1){ +// var linkhelperstringposition=linktext.indexOf(".html"); +// var linkposend=findend(linktext,linkhelperstringposition); +// linkhelper.url=linktext.substring(linktext.lastIndexOf("http",linkhelperstringposition),linkposend); +// linktext=linktext.substring(linkhelperstringposition+5,linktext.length) +// if ((attachmentList.length==0) || (attachmentList[attachmentList.length-1].url!=linkhelper.url)){attachmentList.push(linkhelper)} +// } +// } +// } newsitemobject.attachmentList=attachmentList; diff --git a/source-android/js/photoworker.js b/source-android/js/photoworker.js index 76f2129..029c78e 100644 --- a/source-android/js/photoworker.js +++ b/source-android/js/photoworker.js @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify diff --git a/source-android/js/service.js b/source-android/js/service.js index 4043488..ff2ad99 100644 --- a/source-android/js/service.js +++ b/source-android/js/service.js @@ -1,4 +1,5 @@ -// This file is part of Friendiqa // https://github.com/lubuwest/Friendiqa +// This file is part of Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify @@ -48,6 +49,7 @@ function initDatabase(database) { // initialize the database object 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)'); + tx.executeSql('CREATE TABLE IF NOT EXISTS globaloptions(k TEXT, v TEXT)') })} function cleanPermissions(oldperms){ @@ -293,6 +295,31 @@ function readActiveConfig(database){ return obj; } +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'); + for (var r=0; r // // This program is free software: you can redistribute it and/or modify diff --git a/source-android/qml/calendarqml/CalendarDay.qml b/source-android/qml/calendarqml/CalendarDay.qml index 21064df..cff48f2 100644 --- a/source-android/qml/calendarqml/CalendarDay.qml +++ b/source-android/qml/calendarqml/CalendarDay.qml @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify diff --git a/source-android/qml/calendarqml/CalendarTab.qml b/source-android/qml/calendarqml/CalendarTab.qml index 3f96a62..919745f 100644 --- a/source-android/qml/calendarqml/CalendarTab.qml +++ b/source-android/qml/calendarqml/CalendarTab.qml @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify diff --git a/source-android/qml/calendarqml/EventList.qml b/source-android/qml/calendarqml/EventList.qml index 8632657..8a98bef 100644 --- a/source-android/qml/calendarqml/EventList.qml +++ b/source-android/qml/calendarqml/EventList.qml @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify diff --git a/source-android/qml/configqml/ConfigTab.qml b/source-android/qml/configqml/ConfigTab.qml index 23abd1c..1d20d7b 100644 --- a/source-android/qml/configqml/ConfigTab.qml +++ b/source-android/qml/configqml/ConfigTab.qml @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify @@ -123,6 +123,11 @@ StackView{ visible: false x: 4*mm; y: 70*mm; width:20*mm;wrapMode: Text.Wrap } + +// Text { +// text: qsTr("Show Website") +// x: 4*mm; y: 70*mm; width: 20*mm +// } Image{ id:servericon @@ -176,12 +181,15 @@ StackView{ Rectangle{ color: "light grey" - x: 25*mm; y: 20*mm; width: root.width/2; height: 5*mm; + x: 25*mm; y: 20*mm; width: root.width/2-9*mm; height: 5*mm; TextInput { id: username anchors.fill: parent selectByMouse: true - //onEditingFinished:{ + onEditingFinished:{ + if (username.text.indexOf('@')>-1){ + Helperjs.showMessage(qsTr("Error"),qsTr("Nicknames containing @ symbol currently not supported"),configBackground) + } // Helperjs.friendicaWebRequest(servername.text+'/api/users/show?screen_name='+username.text,configBackground,function(obj){ // var screennametest=JSON.parse(obj); // if (screennametest.hasOwnProperty('status')){ @@ -190,8 +198,16 @@ StackView{ // }else{configBackground.registeredUser=true} // }); // } - } + } + } } + BlueButton { + x: root.width/2+18*mm; y: 20*mm; width:7*mm + text: "\uf234" + onClicked: { + configStack.push({item:"qrc:/qml/configqml/RegisterPage.qml",properties:{url:servername.text+"/register?nickname="+username.getText(0,username.length)}}) + } + } Rectangle{ color: "light grey" @@ -284,6 +300,23 @@ StackView{ } + +// CheckBox{ +// id:showwebsiteCheckbox +// x:35*mm;y:70*mm +// onClicked:{ +// if (checked==true){ +// Service.updateglobaloptions(root.db,"showWebsiteForLinks","true") +// root.globaloptions.showWebsiteForLinks="true" +// } +// else { +// Service.updateglobaloptions(root.db,"showWebsiteForLinks","false") +// root.globaloptions.showWebsiteForLinks="false" +// } +// } + +// } + BlueButton { x: 25*mm; y: 78*mm text: qsTr("Confirm") @@ -328,6 +361,8 @@ StackView{ else {Helperjs.showMessage(qsTr("Error"), errormessage,root)} }} + + BlueButton { x: root.width/2+2*mm; y: mm; width: 5*mm; height: 5*mm; text: "-" @@ -413,8 +448,18 @@ StackView{ messageIntervalSlider.value=obj.timerInterval; if( obj.isActive==0){userButton.fontColor='black'} else {userButton.fontColor='grey'}},"isActive",0 ) + }) + //Service.readGlobaloptions(db,function(go){ +// if (root.globaloptions.showWebsiteForLinks!="false"){showwebsiteCheckbox.checked=true} + //}) + + } + catch (e){ + Helperjs.friendicaWebRequest("https://dir.friendica.social/servers/surprise",configBackground,function(html){ + var bpos=html.indexOf("baseurl"); + var baseurl=html.substring(html.indexOf("http",bpos),html.indexOf('"',html.indexOf("http",bpos))); + servername.text=baseurl })} - catch (e){print(e)} } } } diff --git a/source-android/qml/configqml/InfoBox.qml b/source-android/qml/configqml/InfoBox.qml index af16e28..98c04ff 100644 --- a/source-android/qml/configqml/InfoBox.qml +++ b/source-android/qml/configqml/InfoBox.qml @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify @@ -43,7 +43,7 @@ Rectangle{ textFormat: Text.RichText width: parent.width wrapMode: Text.WrapAtWordBoundaryOrAnywhere - text: "Friendiqa v0.3.3
Licensed under GPL 3 with the exception of OpenSSL
"+ + text: "Friendiqa v0.3.4
Licensed under GPL 3 with the exception of OpenSSL
"+ "Profile https://freunde.ma-nic.de/profile/friendiqa
"+ "Sourcecode: https://git.friendi.ca/LubuWest/Friendiqa
"+ "Most of C++ code by Fabio
"+ diff --git a/source-android/qml/configqml/OSSettingsAndroid.qml b/source-android/qml/configqml/OSSettingsAndroid.qml index 0974706..715d54b 100644 --- a/source-android/qml/configqml/OSSettingsAndroid.qml +++ b/source-android/qml/configqml/OSSettingsAndroid.qml @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify diff --git a/source-android/qml/configqml/OSSettingsLinux.qml b/source-android/qml/configqml/OSSettingsLinux.qml index adde0c6..1f107b5 100644 --- a/source-android/qml/configqml/OSSettingsLinux.qml +++ b/source-android/qml/configqml/OSSettingsLinux.qml @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify diff --git a/source-android/qml/configqml/RegisterPage.qml b/source-android/qml/configqml/RegisterPage.qml new file mode 100644 index 0000000..299a086 --- /dev/null +++ b/source-android/qml/configqml/RegisterPage.qml @@ -0,0 +1,61 @@ +// This file is part of Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa +// Copyright (C) 2017 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 QtWebView 1.1 +import "qrc:/qml/genericqml" + +Rectangle{ + color:"white" + //border.color: "light grey" + property alias url:htmlview.url + width:root.width-5*mm + height:root.height-12*mm + + WebView {id:htmlview; + height:parent.height-7*mm + width:parent.width + y:7*mm + MouseArea {anchors.fill:parent; + onClicked:{print(url)} + } + onLoadingChanged: print(loadProgress) + } + BlueButton{ + id:closeButton + anchors.top: parent.top + anchors.topMargin: 1*mm + anchors.right: parent.right + anchors.rightMargin: 1*mm + text: "\uf057" + onClicked:{configStack.pop()} + } +} diff --git a/source-android/qml/contactqml/ContactComponent.qml b/source-android/qml/contactqml/ContactComponent.qml index 71066a1..2e4aabe 100644 --- a/source-android/qml/contactqml/ContactComponent.qml +++ b/source-android/qml/contactqml/ContactComponent.qml @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify diff --git a/source-android/qml/contactqml/ContactDetailsComponent.qml b/source-android/qml/contactqml/ContactDetailsComponent.qml index 45d3767..e2b5d37 100644 --- a/source-android/qml/contactqml/ContactDetailsComponent.qml +++ b/source-android/qml/contactqml/ContactDetailsComponent.qml @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify @@ -113,7 +113,7 @@ Rectangle{ fotostab.phototabstatus="Contact"; root.currentIndex=2; fotostab.active=true; - root.fotoSignal(root.login,contact) ; + root.fotoSignal(contact) ; contactLargeComponent.destroy(); } } diff --git a/source-android/qml/contactqml/Contactlist.qml b/source-android/qml/contactqml/Contactlist.qml index 8e8250e..66c07e7 100644 --- a/source-android/qml/contactqml/Contactlist.qml +++ b/source-android/qml/contactqml/Contactlist.qml @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify diff --git a/source-android/qml/contactqml/FriendsTab.qml b/source-android/qml/contactqml/FriendsTab.qml index 26926ac..601787d 100644 --- a/source-android/qml/contactqml/FriendsTab.qml +++ b/source-android/qml/contactqml/FriendsTab.qml @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify diff --git a/source-android/qml/contactqml/GroupComponent.qml b/source-android/qml/contactqml/GroupComponent.qml index bf243f0..04097b7 100644 --- a/source-android/qml/contactqml/GroupComponent.qml +++ b/source-android/qml/contactqml/GroupComponent.qml @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify diff --git a/source-android/qml/contactqml/ProfileComponent.qml b/source-android/qml/contactqml/ProfileComponent.qml index 9a4aa88..0357bfb 100644 --- a/source-android/qml/contactqml/ProfileComponent.qml +++ b/source-android/qml/contactqml/ProfileComponent.qml @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify @@ -141,6 +141,7 @@ Rectangle { MouseArea{ anchors.fill: parent onClicked:{ + imagePicking=true; var imagePicker = Qt.createQmlObject('import QtQuick 2.0; import "qrc:/qml/genericqml";'+ osSettings.imagePickQml+'{multiple: false;onReady: {photoImage.source=imageUrl;'+ '}}',profileGridTab,"imagePicker"); diff --git a/source-android/qml/friendiqa.qml b/source-android/qml/friendiqa.qml index c615b54..d61790c 100644 --- a/source-android/qml/friendiqa.qml +++ b/source-android/qml/friendiqa.qml @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify @@ -56,10 +56,11 @@ TabView{ property var db: ["Friendiqa", "1.0", "Stores Friendica data", 100000000] property var login: Service.readActiveConfig(db) + property var globaloptions: ({}) //Service.readGlobaloptions(db) property var contactlist: [] property real mm: Screen.pixelDensity signal messageSignal(var friend) - signal fotoSignal(var login, var friend) + signal fotoSignal(var username, var friend) signal directmessageSignal(var friend) signal newsSignal(var news) signal friendsSignal(var username) @@ -191,6 +192,7 @@ TabView{ source: (root.currentIndex==4)?"qrc:/qml/configqml/ConfigTab.qml":"" } Component.onCompleted: { + Service.readGlobaloptions(db,function(go){globaloptions=go}) //print(xhr.networktype); if(osSettings.imagePickQml=="ImagePicker"){var component = Qt.createComponent("qrc:/qml/genericqml/IntentReceiver.qml"); var IntentReceiverQml = component.createObject(root) diff --git a/source-android/qml/newsqml/ContactPage.qml b/source-android/qml/newsqml/ContactPage.qml index 7e9f604..6fe470d 100644 --- a/source-android/qml/newsqml/ContactPage.qml +++ b/source-android/qml/newsqml/ContactPage.qml @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify @@ -110,7 +110,6 @@ Rectangle { onClicked:{ currentIndex=0; directmessageSignal(contact.screen_name) - newsStack.pop() } } @@ -126,7 +125,7 @@ Rectangle { } } - }//Row end + }//Column end Label { id: namelabel x:mm @@ -168,7 +167,7 @@ Rectangle { contactBusy.running=false; contactModel.clear(); var currentTime= new Date(); - var msg = {'currentTime': currentTime, 'model': contactModel,'news':newstab.contactposts}; + var msg = {'currentTime': currentTime, 'model': contactModel,'news':newstab.contactposts, 'options':globaloptions}; contactWorker.sendMessage(msg) } } diff --git a/source-android/qml/newsqml/Conversation.qml b/source-android/qml/newsqml/Conversation.qml index 45921a3..8157383 100644 --- a/source-android/qml/newsqml/Conversation.qml +++ b/source-android/qml/newsqml/Conversation.qml @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify @@ -81,7 +81,7 @@ Rectangle { } else { conversationBusy.running=false; conversationModel.clear(); var currentTime= new Date(); - var msg = {'currentTime': currentTime, 'model': conversationModel,'news':newstab.conversation}; + var msg = {'currentTime': currentTime, 'model': conversationModel,'news':newstab.conversation, 'options':globaloptions}; conversationWorker.sendMessage(msg) //conversationsymbol.color="grey" } @@ -112,7 +112,7 @@ Rectangle { wrapMode: Text.Wrap anchors.fill: parent selectByMouse: true - onHeightChanged: newsView.contentY+=4.5*mm + onHeightChanged: conversationView.contentY+=4.5*mm } } diff --git a/source-android/qml/newsqml/FriendicaActivities.qml b/source-android/qml/newsqml/FriendicaActivities.qml index e235518..38ffe3b 100644 --- a/source-android/qml/newsqml/FriendicaActivities.qml +++ b/source-android/qml/newsqml/FriendicaActivities.qml @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify diff --git a/source-android/qml/newsqml/Hashtag.qml b/source-android/qml/newsqml/Hashtag.qml index 27584c0..2b1cf68 100644 --- a/source-android/qml/newsqml/Hashtag.qml +++ b/source-android/qml/newsqml/Hashtag.qml @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify diff --git a/source-android/qml/newsqml/MessageSend.qml b/source-android/qml/newsqml/MessageSend.qml index 25081f0..6d6ded6 100644 --- a/source-android/qml/newsqml/MessageSend.qml +++ b/source-android/qml/newsqml/MessageSend.qml @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify diff --git a/source-android/qml/newsqml/NewsImage.qml b/source-android/qml/newsqml/NewsImage.qml index a4116a1..b587e22 100644 --- a/source-android/qml/newsqml/NewsImage.qml +++ b/source-android/qml/newsqml/NewsImage.qml @@ -1,5 +1,5 @@ // This file is part of Friendiqa -// https://github.com/lubuwest/Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa // Copyright (C) 2017 Marco R. // // This program is free software: you can redistribute it and/or modify diff --git a/source-android/qml/newsqml/NewsLink.qml b/source-android/qml/newsqml/NewsLink.qml new file mode 100644 index 0000000..56e80ed --- /dev/null +++ b/source-android/qml/newsqml/NewsLink.qml @@ -0,0 +1,52 @@ +// This file is part of Friendiqa +// https://git.friendi.ca/lubuwest/Friendiqa +// Copyright (C) 2017 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 "qrc:/js/helper.js" as Helperjs +//import QtWebView 1.1 + +Rectangle{ + color:"transparent" + width:newscolumn.width; + height:newscolumn.width/4*3 + property string url:""//htmlview.text + + Text{id:htmlview + textFormat:Text.RichText + } +// WebView {id:htmlview; +// anchors.fill: parent +// } + Component.onCompleted: //Helperjs.friendicaWebRequest(url,parent,function(html){ + //print(html); + htmlview.text="Text