bugfixes timeline refresh and screenshots

This commit is contained in:
LubuWest 2022-03-03 21:39:41 +01:00
parent 5032c78de1
commit 4ffae4ac31
13 changed files with 46 additions and 101 deletions

View file

@ -1,40 +0,0 @@
--- source-linux/CMakeLists.txt 2021-05-12 21:27:38.172988268 +0200
+++ source-linux/CMakeLists.txt 2021-06-22 21:57:17.487089044 +0200
@@ -13,7 +13,7 @@
set(CMAKE_INCLUDE_CURRENT_DIR ON)
endif()
-find_package(Qt5 COMPONENTS Widgets Quick Sql DBus WebView REQUIRED)
+find_package(Qt5 COMPONENTS Widgets Quick Sql DBus REQUIRED)
set(MOC_SOURCES common/uploadableimage.h
common/xhr.h
@@ -38,7 +38,6 @@
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::Webengine)
--- source-linux/js/newsworker.js 2021-06-22 21:40:46.938247380 +0200
+++ source-linux/js/newsworker.js 2021-06-22 22:00:10.789922846 +0200
@@ -107,17 +107,7 @@
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)}
- }
- }
+
newsitemobject.videoAttachmentList=videoAttachmentList;
newsitemobject.imageAttachmentList=imageAttachmentList;
if ((msg.options.hasOwnProperty("hide_nsfw"))&&(msg.options.hide_nsfw==1)&&(newsitemobject.text.indexOf("#nsfw")>-1)){

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -61,6 +61,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[]) {
UPDATENEWS* updatenews= UPDATENEWS::instance(); UPDATENEWS* updatenews= UPDATENEWS::instance();
updatenews->setDatabase(); updatenews->setDatabase();
updatenews->login(); updatenews->login();
updatenews->setSyncAll(true);
updatenews->startsync(); updatenews->startsync();
app.connect (updatenews,SIGNAL(quitapp()),&app,SLOT(quit())); app.connect (updatenews,SIGNAL(quitapp()),&app,SLOT(quit()));
return app.exec(); return app.exec();

View file

@ -43,16 +43,14 @@ import "qrc:/qml/genericqml"
Rectangle { Rectangle {
id:calendarrectangle id:calendarrectangle
// y:1 // y:1
width:parent.width//-mm width:parent.width
height:parent.height//-5*mm height:parent.height
// anchors.fill: parent color: Material.backgroundColor
color: Material.backgroundColor//'#fff'
property date currentTime: new Date() property date currentTime: new Date()
property int offsetTime: currentTime.getTimezoneOffset() * 60 * 1000 property int offsetTime: currentTime.getTimezoneOffset() * 60 * 1000
property var events:[] property var events:[]
property var eventdays:[] property var eventdays:[]
function showEvents(friend){ function showEvents(friend){
if(friend=="backButton"){Service.eventsfromdb(db,login.username,function(eventArray,dayArray){ if(friend=="backButton"){Service.eventsfromdb(db,login.username,function(eventArray,dayArray){
events=eventArray; events=eventArray;
@ -90,8 +88,6 @@ Rectangle {
} }
BlueButton{ BlueButton{
x:mm
y:mm
z:2 z:2
visible: !wideScreen visible: !wideScreen
fontColor: "grey" fontColor: "grey"
@ -128,9 +124,6 @@ Rectangle {
updatenews.login(); updatenews.login();
updatenews.setSyncAll(false); updatenews.setSyncAll(false);
updatenews.events(); updatenews.events();
// Service.getEvents(db,login, calendartab,function(){
// showEvents("")
// })
}} }}
Connections{ Connections{
@ -140,8 +133,7 @@ Rectangle {
calBusy.running=false; calBusy.running=false;
showEvents("") showEvents("")
} }
} }
MButton{ MButton{
id: calendartabstatusButton id: calendartabstatusButton
@ -167,7 +159,6 @@ Rectangle {
onClicked: {calendartabmenu.popup()} onClicked: {calendartabmenu.popup()}
} }
ListView{ ListView{
id: calendarView id: calendarView
y:2*root.fontFactor*osSettings.bigFontSize//8*mm y:2*root.fontFactor*osSettings.bigFontSize//8*mm

View file

@ -316,6 +316,7 @@ Page{
//reset values //reset values
login=userconfig; login=userconfig;
news=[]; news=[];
contactlist=[];
rootstack.currentIndex=0; rootstack.currentIndex=0;
newstypeSignal("refresh"); newstypeSignal("refresh");
},"isActive",0); },"isActive",0);

View file

@ -45,14 +45,12 @@ Rectangle {
color: Material.backgroundColor//"white" color: Material.backgroundColor//"white"
function showContactdetails(contact){ function showContactdetails(contact){
// rootstack.currentIndex=0; // rootstack.currentIndex=0;
// bar.currentIndex=0; // bar.currentIndex=0;
root.contactdetailsSignal(contact) root.contactdetailsSignal(contact)
} }
BlueButton{ BlueButton{
x:mm
y:mm
z:2 z:2
visible: !wideScreen visible: !wideScreen
fontColor: "grey" fontColor: "grey"
@ -64,33 +62,33 @@ Rectangle {
} }
TabBar { TabBar {
id: friendsbar id: friendsbar
width: osSettings.osType=="Android"?parent.width-2*root.fontFactor*osSettings.bigFontSize:parent.width width: osSettings.osType=="Android"?parent.width-2*root.fontFactor*osSettings.bigFontSize:parent.width
height: 2*root.fontFactor*osSettings.bigFontSize height: 2*root.fontFactor*osSettings.bigFontSize
x: osSettings.osType=="Android"?2*root.fontFactor*osSettings.bigFontSize:0 x: osSettings.osType=="Android"?2*root.fontFactor*osSettings.bigFontSize:0
visible: !wideScreen visible: !wideScreen
position:TabBar.Header position:TabBar.Header
currentIndex: 1 currentIndex: 1
TabButton { TabButton {
text: qsTr("Me") text: qsTr("Me")
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
height: 1.7*root.fontFactor*osSettings.bigFontSize//7*mm height: 1.7*root.fontFactor*osSettings.bigFontSize//7*mm
} }
TabButton { TabButton {
text: qsTr("Friends") text: qsTr("Friends")
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
height: 1.7*root.fontFactor*osSettings.bigFontSize//7*mm height: 1.7*root.fontFactor*osSettings.bigFontSize//7*mm
} }
TabButton { TabButton {
text: qsTr("Contacts") text: qsTr("Contacts")
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
height: 1.7*root.fontFactor*osSettings.bigFontSize//7*mm height: 1.7*root.fontFactor*osSettings.bigFontSize//7*mm
} }
TabButton { TabButton {
text: qsTr("Groups") text: qsTr("Groups")
font.pointSize: osSettings.systemFontSize font.pointSize: osSettings.systemFontSize
height: 1.7*root.fontFactor*osSettings.bigFontSize//7*mm height: 1.7*root.fontFactor*osSettings.bigFontSize//7*mm
} }
} }
LeftDrawerLinux{ LeftDrawerLinux{
@ -145,7 +143,4 @@ Rectangle {
source:(friendsTabView.currentIndex==3)? "qrc:/qml/contactqml/GroupsListTab.qml":"" source:(friendsTabView.currentIndex==3)? "qrc:/qml/contactqml/GroupsListTab.qml":""
} }
} }
Component.onCompleted: {
//root.contactdetailsSignal.connect(showContactdetails);
}
} }

View file

@ -220,7 +220,7 @@ Rectangle{
Rectangle{ Rectangle{
color: Material.backgroundColor color: Material.backgroundColor
radius: 0.5*mm radius: 0.5*mm
visible:(newsSwipeview.stacktype!="Notifications") visible:(conversation || (newsSwipeview.stacktype!="Notifications"))
x:mm x:mm
width: parent.width-2*mm width: parent.width-2*mm
height:Math.max(bodyField.contentHeight+4*mm,2.5*root.fontFactor*osSettings.bigFontSize) height:Math.max(bodyField.contentHeight+4*mm,2.5*root.fontFactor*osSettings.bigFontSize)

View file

@ -140,7 +140,6 @@ Rectangle{
} }
} }
function showNews(newsToShow){ function showNews(newsToShow){
try{if (rootstackView.depth>1){rootstackView.pop()}}catch(e){} try{if (rootstackView.depth>1){rootstackView.pop()}}catch(e){}
newsBusy.running=false; newsBusy.running=false;
@ -153,8 +152,6 @@ Rectangle{
} }
} }
function search(term){ function search(term){
if (term!=""){ if (term!=""){
newstabstatus="Search"; newstabstatus="Search";
@ -175,10 +172,8 @@ Rectangle{
try{var oldnewsitemobject=newsModel.get(newsModel.count-1).newsitemobject; try{var oldnewsitemobject=newsModel.get(newsModel.count-1).newsitemobject;
if(oldnewsitemobject.hasOwnProperty("lastcomment")){ if(oldnewsitemobject.hasOwnProperty("lastcomment")){
var lastnews_id=oldnewsitemobject.lastcomment.created_at; var lastnews_id=oldnewsitemobject.lastcomment.created_at;
//var lastconv_id=oldnewsitemobject.lastcomment.statusnet_conversation_id
}else{ }else{
var lastnews_id=oldnewsitemobject.created_at; 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; var messagetype=0;
@ -345,23 +340,29 @@ Rectangle{
} else if (newstab.newstabstatus=="Conversations" || newstabstatus=="Conversations"){ } else if (newstab.newstabstatus=="Conversations" || newstabstatus=="Conversations"){
newsStack.updateMethodNews="conversation"} newsStack.updateMethodNews="conversation"}
else {newsStack.updateMethodNews="refresh"} else {newsStack.updateMethodNews="refresh"}
let currentnewstabstatus="Conversations";
if (newstab.newstabstatus!=""){
currentnewstabstatus=newstab.newstabstatus
}else if (newstabstatus!=""){
currentnewstabstatus=newstabstatus
}
if (newsSwipeview.stacktype=="Home"){ if (newsSwipeview.stacktype=="Home"){
Newsjs.getLastNews(root.login,root.db,function(currentlastnews){ Newsjs.getLastNews(root.login,root.db,function(currentlastnews){
if (currentlastnews>lastnewsid){ if (currentlastnews>lastnewsid){
if(newstab.newstabstatus=="Timeline"){ if(currentnewstabstatus=="Timeline"){
try{ Newsjs.newsfromdb(root.db,root.login,0, function(dbnews,lastid){ try{ Newsjs.newsfromdb(root.db,root.login,0, function(dbnews,lastid){
lastnewsid=lastid; lastnewsid=lastid;
showNews(dbnews) showNews(dbnews)
})}catch(e){Helperjs.showMessage("Error",e,root)}; })}catch(e){Helperjs.showMessage("Error",e,root)};
} }
if(newstab.newstabstatus=="Conversations"){ if(currentnewstabstatus=="Conversations"){
Newsjs.chatsfromdb(db,root.login,0,[],function(news,lastid){ Newsjs.chatsfromdb(db,root.login,0,[],function(news,lastid){
lastnewsid=lastid; lastnewsid=lastid;
showNews(news)}); showNews(news)});
} }
} else {print("newstab.newstabstatus "+newstab.newstabstatus) } else {
Service.updateView(newstab.newstabstatus) Service.updateView(currentnewstabstatus)
} }
}); });
} }

View file

@ -130,8 +130,6 @@ Rectangle{
// anchors.left: newsSwipeview.right // anchors.left: newsSwipeview.right
// } // }
BlueButton{ BlueButton{
x:mm
y:mm
z:2 z:2
visible: !wideScreen visible: !wideScreen
fontColor: "grey" fontColor: "grey"

View file

@ -162,8 +162,6 @@ StackView{
} }
BlueButton{ BlueButton{
x:mm
y:mm
z:2 z:2
visible: !wideScreen visible: !wideScreen
fontColor: Material.secondaryTextColor//"grey" fontColor: Material.secondaryTextColor//"grey"