bugfixes timeline refresh and screenshots

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

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"