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->setDatabase();
updatenews->login();
updatenews->setSyncAll(true);
updatenews->startsync();
app.connect (updatenews,SIGNAL(quitapp()),&app,SLOT(quit()));
return app.exec();

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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