Friendiqa/src/qml/newsqml/NewsStack.qml

570 lines
22 KiB
QML
Raw Normal View History

2019-06-25 20:59:10 +02:00
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
2020-05-24 21:14:23 +02:00
// Copyright (C) 2020 Marco R. <thomasschmidt45@gmx.net>
2019-06-25 20:59:10 +02:00
//
// 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 <http://www.gnu.org/licenses/>.
2024-04-05 19:28:47 +02:00
import QtQuick 6.3
import QtQuick.Controls 6.3
2019-06-25 20:59:10 +02:00
import "qrc:/js/news.js" as Newsjs
import "qrc:/js/helper.js" as Helperjs
import "qrc:/js/service.js" as Service
2023-11-04 18:04:55 +01:00
import "qrc:/qml/genericqml"
2019-06-25 20:59:10 +02:00
2021-05-12 21:41:34 +02:00
Rectangle{
2019-06-25 20:59:10 +02:00
id: newsStack
color: osSettings.backgroundColor
2019-06-25 20:59:10 +02:00
property string updateMethodNews: "refresh"
property var allchats: ({})
property int lastnewsid:0
2021-05-12 21:41:34 +02:00
property string newstabstatus: ""
2019-06-25 20:59:10 +02:00
2024-04-05 19:28:47 +02:00
function newstypeHandling(newstype){
2024-04-15 17:24:30 +02:00
newsModel.clear();
2024-04-05 19:28:47 +02:00
//if (!newsBusy.running) {
try{newsBusy.running=true}catch(e){print("newsBusy.running=true " + e)};
2023-11-04 18:04:55 +01:00
//root.replySignal("");
switch(newstype){
case "timeline":
newstab.newstabstatus="Timeline";
try{ Newsjs.newsfromdb(root.db,root.login,0, function(dbnews,lastid){
lastnewsid=lastid;
showNews(dbnews)
})}catch(e){//Helperjs.showMessage("Error",e,root)
};
break;
case "conversation":
2024-04-05 19:28:47 +02:00
updateMethodNews="conversation";
2023-11-04 18:04:55 +01:00
newstab.newstabstatus="Conversations";
Newsjs.chatsfromdb(root.db,root.login,0,[],function(news,lastid){
lastnewsid=lastid;
showNews(news)});
break;
case "favorites":
2024-04-05 19:28:47 +02:00
updateMethodNews="refresh";
2023-11-04 18:04:55 +01:00
newstab.newstabstatus="Favorites";
Service.updateView("Favorites");
expectScreenUpdate=true;
break;
case "replies":
2024-04-05 19:28:47 +02:00
updateMethodNews="refresh";
2023-11-04 18:04:55 +01:00
newstab.newstabstatus="Replies";
Service.updateView("Replies");
expectScreenUpdate=true;
break;
case "publictimeline":
2024-04-05 19:28:47 +02:00
updateMethodNews="refresh";
2023-11-04 18:04:55 +01:00
newstab.newstabstatus="Public Timeline";
Service.updateView("Public Timeline");
expectScreenUpdate=true;
break;
case "groupnews":
2024-04-05 19:28:47 +02:00
updateMethodNews="refresh";
2023-11-04 18:04:55 +01:00
newstab.newstabstatus="Groupnews";
Service.showGroups();
expectScreenUpdate=true;
break;
case "search":
2024-04-05 19:28:47 +02:00
newsView.anchors.topMargin=root.fontFactor*osSettings.bigFontSize*3;
2023-11-04 18:04:55 +01:00
newstab.newstabstatus="Search";
newsBusy.running=false;
2024-04-05 19:28:47 +02:00
searchBox.visible=true;
2023-11-04 18:04:55 +01:00
break;
case "refresh":
if (newstab.newstabstatus=="Timeline" || newstabstatus=="Timeline"){
2024-04-05 19:28:47 +02:00
updateMethodNews="append"
2023-11-04 18:04:55 +01:00
} else if (newstab.newstabstatus=="Conversations" || newstabstatus=="Conversations"){
2024-04-05 19:28:47 +02:00
updateMethodNews="conversation"}
else {updateMethodNews="refresh"}
2023-11-04 18:04:55 +01:00
//root.contactLoadType="news";
if (newsSwipeview.stacktype=="Home"){
Service.updateView(newstab.newstabstatus,lastnewsid)
}
else if (newsSwipeview.stacktype=="Directmessage"){
Service.updateView("Direct Messages",lastnewsid)
}
else if (newsSwipeview.stacktype=="Notifications"){
Service.updateView("Notifications")
}
expectScreenUpdate=true;
break;
default:
if (newstab.newstabstatus=="Timeline" || newstabstatus=="Timeline"){
2024-04-05 19:28:47 +02:00
updateMethodNews="append"
2023-11-04 18:04:55 +01:00
} else if (newstab.newstabstatus=="Conversations" || newstabstatus=="Conversations"){
2024-04-05 19:28:47 +02:00
updateMethodNews="conversation"}
else {updateMethodNews="refresh"}
2023-11-04 18:04:55 +01:00
//root.contactLoadType="news";
if (newsSwipeview.stacktype=="Home"){
Service.updateView(newstab.newstabstatus,lastnewsid)
}
2024-04-05 19:28:47 +02:00
else if (newsSwipeview.stacktype=="DirectMessages"){
2023-11-04 18:04:55 +01:00
Service.updateView("Direct Messages",lastnewsid)
}
else if (newsSwipeview.stacktype=="Notifications"){
Service.updateView("Notifications",lastnewsid)
}
else if (newsSwipeview.stacktype=="Favorites"){
Service.updateView("Favorites",lastnewsid)
}
else if (newsSwipeview.stacktype=="Replies"){
Service.updateView("Replies",lastnewsid)
}
else if (newsSwipeview.stacktype=="Public Timeline"){
Service.updateView("Public Timeline",lastnewsid)
}
else if (newsSwipeview.stacktype=="Search"){
Service.updateView("Search",lastnewsid)
}
else{
Service.updateView(newstab.newstabstatus,lastnewsid)
}
expectScreenUpdate=true;
2024-04-05 19:28:47 +02:00
//}
2021-05-12 21:41:34 +02:00
}
}
2019-06-25 20:59:10 +02:00
2021-05-12 21:41:34 +02:00
function showNews(newsToShow){
try{if (rootstackView.depth>1){rootstackView.pop()}}catch(e){}
newsBusy.running=false;
2022-03-01 21:59:21 +01:00
if(newsToShow.length>0){
var currentTime= new Date()
// downloadNotice.text=downloadNotice.text + "\n shownews start "+ Date.now();
2024-04-05 19:28:47 +02:00
if (newsToShow.length==1){var method="refresh"}else{var method = updateMethodNews}
2022-03-01 21:59:21 +01:00
var msg = {'currentTime': currentTime, 'model': newsModel,'news':newsToShow,'method':method, 'options':globaloptions};
newsWorker.sendMessage(msg);
}
2021-05-12 21:41:34 +02:00
}
2019-06-25 20:59:10 +02:00
function search(term){
2021-05-12 21:41:34 +02:00
if (term!=""){
newsBusy.running=true;
2024-04-22 22:01:01 +02:00
newsSwipeview.stacktype="Search";
2024-04-05 19:28:47 +02:00
updateMethodNews="refresh";
2023-05-24 21:40:26 +02:00
xhr.setAccount(login);
2024-04-05 19:28:47 +02:00
xhr.setApi("/api/search/tweets");
2021-05-12 21:41:34 +02:00
xhr.setParam("q",term)
xhr.get();
expectScreenUpdate=true;
}
2021-05-12 21:41:34 +02:00
newsView.anchors.topMargin=mm
}
2024-04-15 17:24:30 +02:00
function getOldNews(){
2019-12-10 21:12:32 +01:00
var currentTime= new Date();
2021-10-28 21:56:00 +02:00
try{var oldnewsitemobject=newsModel.get(newsModel.count-1).newsitemobject;
if(oldnewsitemobject.hasOwnProperty("lastcomment")){
var lastnews_id=oldnewsitemobject.lastcomment.created_at;
}else{
var lastnews_id=oldnewsitemobject.created_at;
}
2022-03-01 21:59:21 +01:00
} catch(e){print(e);var lastnews_id=99999999999999}
2021-05-12 21:41:34 +02:00
var messagetype=0;
switch(newsSwipeview.stacktype){
case "Home":messagetype=0;break;
case "DirectMessages": messagetype=1;break;
case "Notifications":messagetype=2;break;
case "Replies":messagetype=3;break;
default:messagetype=0;
}
2022-03-01 21:59:21 +01:00
if(newsSwipeview.stacktype!="Home"|| newstab.newstabstatus=="Timeline" || newstabstatus=="Timeline" ){
2019-12-10 21:12:32 +01:00
Newsjs.newsfromdb(root.db,root.login, messagetype,function(news){
2020-02-02 21:49:07 +01:00
var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'method':"", 'options':globaloptions};
2019-12-10 21:12:32 +01:00
newsWorker.sendMessage(msg);
},false,lastnews_id)}
else if(newstab.newstabstatus=="Conversations" || newstabstatus=="Conversations"){
2022-03-01 21:59:21 +01:00
var currentconversations=[];
for (let c=0;c<newsModel.count;c++){
currentconversations.push(parseInt(newsModel.get(c).newsitemobject.statusnet_conversation_id))
}
Newsjs.chatsfromdb(root.db,root.login, messagetype,currentconversations,function(news){
2020-02-02 21:49:07 +01:00
var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'method':"", 'options':globaloptions};
2019-12-10 21:12:32 +01:00
newsWorker.sendMessage(msg);
},lastnews_id)}
else if (newstab.newstabstatus=="Notifications" || newstabstatus=="Notifications"){}
else{
2023-11-04 18:04:55 +01:00
// switch(newsSwipeview.stacktype){
// case "Home":messagetype=0;break;
// case "DirectMessages": messagetype=1;break;
// case "Notifications":messagetype=2;break;
// case "Replies":messagetype=3;break;
// default:messagetype=0;
// }
2019-12-10 21:12:32 +01:00
try{xhr.setParam("max_id",newsModel.get(newsModel.count-1).newsitemobject.id-1);}catch(e){}
xhr.get()
expectScreenUpdate=true;
2019-12-10 21:12:32 +01:00
}
}
2023-05-31 20:47:17 +02:00
function loadDBNews(){
2023-11-04 18:04:55 +01:00
var messagetype=99;
2023-05-31 20:47:17 +02:00
switch(newsSwipeview.stacktype){
case "Home":messagetype=0;break;
case "DirectMessages": messagetype=1;break;
case "Notifications":messagetype=2;break;
case "Replies":messagetype=3;break;
2023-11-04 18:04:55 +01:00
default:messagetype=99;
2023-05-31 20:47:17 +02:00
}
if((newstabstatus=="Conversations")&&(newsSwipeview.stacktype=="Home")){
Newsjs.chatsfromdb(db,login,messagetype,[],function(dbnews,lastid){
lastnewsid=lastid;
2024-04-15 17:24:30 +02:00
if (dbnews.length==0){
newstypeHandling()
}
else{
showNews(dbnews);
}
2023-05-31 20:47:17 +02:00
})
}
2023-11-04 18:04:55 +01:00
else if (messagetype==99){
2024-04-05 19:28:47 +02:00
//newstypeHandling()
2023-11-04 18:04:55 +01:00
}
2023-05-31 20:47:17 +02:00
else{
Newsjs.newsfromdb(db,login,messagetype,function(dbnews,lastid){
lastnewsid=lastid;
2024-04-15 17:24:30 +02:00
if (dbnews.length==0){
newstypeHandling()
}
else{
showNews(dbnews);
}
2023-05-31 20:47:17 +02:00
})
}
}
2019-12-10 21:12:32 +01:00
Connections{
2021-05-12 21:41:34 +02:00
target:xhr
2024-04-05 19:28:47 +02:00
function onError(data,url,api,code){print("api "+api+" code "+code+"data"+data)
2021-05-12 21:41:34 +02:00
newsBusy.running=false;
expectScreenUpdate=false;
2021-05-12 21:41:34 +02:00
}
2024-04-15 17:24:30 +02:00
function onSuccess(data,api){
2023-02-09 21:39:43 +01:00
const newsApiArray=["/api/statuses/friends_timeline",
"/api/direct_messages/all",
"/api/direct_messages/conversation",
"/api/direct_messages/new",
"/api/friendica/notification",
"/api/statuses/user_timeline",
"/api/conversation/show",
"/api/search",
"/api/statuses/public_timeline",
"/api/favorites",
"/api/statuses/replies",
"/api/lists/statuses",
"/api/statuses/update",
"/api/direct_messages/new"
2023-11-04 18:04:55 +01:00
];
if(newsApiArray.includes(api) && expectScreenUpdate==true){
expectScreenUpdate=false;
2023-02-09 21:39:43 +01:00
Service.processNews(api,data)
2023-11-04 18:04:55 +01:00
//root.replySignal("")
2023-02-09 21:39:43 +01:00
}
2021-05-12 21:41:34 +02:00
}
}
2024-04-05 19:28:47 +02:00
2023-05-31 20:47:17 +02:00
Connections{
target:updatenews
2023-06-05 21:36:53 +02:00
function onError(api,data){
2023-05-31 20:47:17 +02:00
newsBusy.running=false;
}
function onSuccess(api){
if(expectScreenUpdate){
loadDBNews();
newsBusy.running=false;
expectScreenUpdate=false;
}
2023-05-31 20:47:17 +02:00
}
}
2019-06-25 20:59:10 +02:00
2024-04-05 19:28:47 +02:00
Connections{
target: root
function onNewstypeSignal(type){newstypeHandling(type)}
}
2021-05-12 21:41:34 +02:00
Timer {id:replytimer; interval: 1000; running: false; repeat: false
2023-11-04 18:04:55 +01:00
onTriggered: {print("replytimer")
2021-05-12 21:41:34 +02:00
newsBusy.running=true;
if(newstab.newstabstatus=="Conversation"){
showConversation(newsStack.timelineIndex-1,newsModel.get(0).newsitemobject)}
else{
if (newstab.newstabstatus=="Timeline" || newstabstatus=="Timeline"){
2024-04-05 19:28:47 +02:00
updateMethodNews="append"
} else if (newstab.newstabstatus=="Conversations" || newstabstatus=="Conversations"){
2024-04-05 19:28:47 +02:00
updateMethodNews="conversation"}
else {updateMethodNews="refresh"}
2021-05-12 21:41:34 +02:00
if (newsSwipeview.stacktype=="Home"){
Service.updateView(newstab.newstabstatus)
}
else if (newsSwipeview.stacktype=="DirectMessages"){
Service.updateView("Direct Messages")
}
else if (newsSwipeview.stacktype=="Replies"){
Service.updateView("Replies")
}
expectScreenUpdate=true;
2023-05-24 21:40:26 +02:00
root.replySignal("")
2021-05-12 21:41:34 +02:00
}
}
}
2019-06-25 20:59:10 +02:00
2024-04-15 17:24:30 +02:00
Component {
id:footerComponent
2021-05-12 21:41:34 +02:00
Rectangle{
border.color: "#EEEEEE"
color: osSettings.dialogColor
2021-05-12 21:41:34 +02:00
border.width: 1
width:newsView.width
height:6*mm
Text{
color: osSettings.primaryTextColor
2021-05-12 21:41:34 +02:00
font.pointSize: osSettings.systemFontSize
anchors.centerIn: parent
text:qsTr("More")
}
MouseArea{
anchors.fill:parent
onClicked:{
if (newsModel.count==0){
expectScreenUpdate=true;
2021-05-12 21:41:34 +02:00
if (newsSwipeview.stacktype=="Home"){
Service.updateView(newstab.newstabstatus)
}
else if (newsSwipeview.stacktype=="DirectMessages"){
Service.updateView("Direct Messages")
2020-01-27 21:53:51 +01:00
}
2021-05-12 21:41:34 +02:00
else if (newsSwipeview.stacktype=="Notifications"){
Service.updateView("Notifications")
}
else if (newsSwipeview.stacktype=="Replies"){
Service.updateView("Replies")
}
}
else {getOldNews();}
2021-05-12 21:41:34 +02:00
}
}
2019-06-25 20:59:10 +02:00
}
2021-05-12 21:41:34 +02:00
}
2023-11-04 18:04:55 +01:00
BusyIndicator{
id: newsBusy
anchors.horizontalCenter: newsStack.horizontalCenter
2024-04-05 19:28:47 +02:00
anchors.top: newsStack.top
anchors.topMargin: 2*root.fontFactor*osSettings.bigFontSize
2023-11-04 18:04:55 +01:00
width: 2*root.fontFactor*osSettings.bigFontSize
height: 2*root.fontFactor*osSettings.bigFontSize
z:2
running: false
}
2024-04-05 19:28:47 +02:00
TextInput{
id:searchBox
visible: false
anchors.top: parent.top
anchors.margins: 0.5*root.fontFactor*osSettings.bigFontSize
x: searchCloseButton.width+0.5*root.fontFactor*osSettings.bigFontSize
width: parent.width-root.fontFactor*osSettings.bigFontSize*7
height: root.fontFactor*osSettings.bigFontSize*3
font.pointSize: osSettings.bigFontSize
onVisibleChanged:{
if (visible){searchBox.forceActiveFocus()}
else{newsView.anchors.topMargin=0.5*mm;}}
onAccepted: searchButton.onClicked()
}
MButton {
id: searchButton
visible: searchBox.visible
anchors.left: searchBox.right
anchors.leftMargin: 0.5*root.fontFactor*osSettings.bigFontSize
icon.name: "search"
icon.source: "qrc:/assets/icons/search.svg"
text: qsTr("Close")
display: AbstractButton.IconOnly
onClicked: {search(searchBox.text); searchBox.visible=false}
}
MButton {
id: searchCloseButton
visible: searchBox.visible
anchors.right: searchBox.left
anchors.rightMargin: 0.5*root.fontFactor*osSettings.bigFontSize
font.bold: true
font.pointSize: osSettings.bigFontSize
text: qsTr("Close")
display: AbstractButton.IconOnly
icon.name: "dialog-close"
icon.source: "qrc:/assets/icons/times-circle.svg"
onClicked: {searchBox.text=""; searchBox.visible=false}
}
2021-05-12 21:41:34 +02:00
ListView {
id: newsView
property real oldContentY:0
property bool viewdragged: false
property bool viewdraggedpositive: false
property string viewtype: "news"
2024-04-05 19:28:47 +02:00
anchors.fill:parent
2021-05-12 21:41:34 +02:00
anchors.margins: 0.5*mm
clip: true
spacing: 0
footer: footerComponent
model: newsModel
delegate: Newsitem{}
onDragStarted: oldContentY=contentY
onDragEnded: {
if(verticalOvershoot<-5*mm){
2019-06-25 20:59:10 +02:00
viewdragged=true
2021-05-12 21:41:34 +02:00
}
else if (verticalOvershoot>5*mm){
2019-12-10 21:12:32 +01:00
viewdraggedpositive=true
2021-05-12 21:41:34 +02:00
}
else{
2019-06-25 20:59:10 +02:00
if((contentY-oldContentY)>15*mm){
2021-05-12 21:41:34 +02:00
//swipeIndicator.visible=false;
//newsSwipeview.height=rootstack.height;
//newsSwipeview.y=0;
//rootStackItem.state="fullscreen"
2019-06-25 20:59:10 +02:00
}
else if ((contentY-oldContentY)<-15*mm){
2021-05-12 21:41:34 +02:00
//swipeIndicator.visible=true;
//newsSwipeview.height=rootstack.height-12*mm;
//newsSwipeview.y=5*mm;
//rootStackItem.state=""
2019-06-25 20:59:10 +02:00
}
2021-05-12 21:41:34 +02:00
}
}
onViewdraggedChanged: {
if (viewdragged){
var onlynew=true;
newsBusy.running=true;
viewdragged=false
if (newstab.newstabstatus=="Timeline" || newstabstatus=="Timeline"){
2024-04-05 19:28:47 +02:00
updateMethodNews="append"
} else if (newstab.newstabstatus=="Conversations" || newstabstatus=="Conversations"){
2024-04-05 19:28:47 +02:00
updateMethodNews="conversation"}
else {updateMethodNews="refresh"}
let currentnewstabstatus="Conversations";
if (newstab.newstabstatus!=""){
currentnewstabstatus=newstab.newstabstatus
}else if (newstabstatus!=""){
currentnewstabstatus=newstabstatus
}
2021-05-12 21:41:34 +02:00
if (newsSwipeview.stacktype=="Home"){
Newsjs.getLastNews(root.login,root.db,function(currentlastnews){
if (currentlastnews>lastnewsid){
if(currentnewstabstatus=="Timeline"){
2021-05-12 21:41:34 +02:00
try{ Newsjs.newsfromdb(root.db,root.login,0, function(dbnews,lastid){
lastnewsid=lastid;
showNews(dbnews)
})}catch(e){Helperjs.showMessage("Error",e,root)};
2019-06-25 20:59:10 +02:00
}
if(currentnewstabstatus=="Conversations"){
2022-03-01 21:59:21 +01:00
Newsjs.chatsfromdb(db,root.login,0,[],function(news,lastid){
2021-05-12 21:41:34 +02:00
lastnewsid=lastid;
showNews(news)});
}
2023-02-09 21:39:43 +01:00
} else {
expectScreenUpdate=true;
2023-05-24 21:40:26 +02:00
Service.updateView(currentnewstabstatus,currentlastnews)
2021-05-12 21:41:34 +02:00
}
});
}
2019-06-25 20:59:10 +02:00
else if (newsSwipeview.stacktype=="DirectMessages"){
Service.updateView("Direct Messages")
expectScreenUpdate=true;
2019-06-25 20:59:10 +02:00
}
else if (newsSwipeview.stacktype=="Notifications"){
Service.updateView("Notifications")
expectScreenUpdate=true;
2019-06-25 20:59:10 +02:00
}
else if (newsSwipeview.stacktype=="Replies"){
Service.updateView("Replies")
expectScreenUpdate=true;
2019-06-25 20:59:10 +02:00
}
2019-12-10 21:12:32 +01:00
2021-05-12 21:41:34 +02:00
}
}
onViewdraggedpositiveChanged: {
if (viewdraggedpositive){
2019-12-10 21:12:32 +01:00
getOldNews();
viewdraggedpositive=false
2021-05-12 21:41:34 +02:00
}
}
ScrollBar.vertical: ScrollBar { }
}
2019-06-25 20:59:10 +02:00
2021-05-12 21:41:34 +02:00
ListModel{id: newsModel}
2019-06-25 20:59:10 +02:00
2021-05-12 21:41:34 +02:00
WorkerScript {
id: newsWorker
source: "qrc:/js/newsworker.js"
}
2019-06-25 20:59:10 +02:00
2021-05-12 21:41:34 +02:00
Rectangle{
id:downloadNotice
property alias text: noticeText.text
color:"white"
border.color:"grey"
z:1
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom:parent.bottom
anchors.bottomMargin: 2*mm
width: noticeText.width+2*mm
height: noticeText.height+2*mm
visible: (downloadNotice.text!="")
Text{
id:noticeText
color: "grey"
anchors.centerIn: parent
width: contentWidth
height: contentHeight
font.pointSize: osSettings.systemFontSize
text:""
}
}
Component.onCompleted: {
root.contactdetailsSignal.connect(showContact);
root.newsSignal.connect(showNews);
root.searchSignal.connect(search);
try{newsModel.clear()} catch(e){}
swipeIndicator.visible=true;
root.globaloptions.hasOwnProperty("newsViewType")?newstab.newstabstatus=root.globaloptions.newsViewType:newstab.newstabstatus="Conversations";
newstabstatus=newstab.newstabstatus;
2024-04-05 19:28:47 +02:00
if(newsSwipeview.stacktype=="Search"){searchBox.visible=true} //else if (newsSwipeview.stacktype=="Group News"){newstypeHandling("groupnews")}
if(["Home","DirectMessages","Notifications","Replies"].indexOf(newsSwipeview.stacktype)>-1){loadDBNews()}
2019-06-25 20:59:10 +02:00
}
}