bugfixes reply in Friendica 3/2022 and image download

This commit is contained in:
LubuWest 2022-03-13 21:22:08 +01:00
parent 4ffae4ac31
commit 48a904b8c0
15 changed files with 909 additions and 855 deletions

View file

@ -1,3 +1,8 @@
## v0.6.5
* Fix reply in Friendica 3/2022 version due to API bug
* Image downloads work again
* Some additional emojis
## v0.6.4
@ -5,7 +10,6 @@
* Filter contacts
* many new emojis
* Replaced Favorite button with Reply button due to buggy Favourite API
* View newsitem on website (works only in coversation view)
* Rebuild contacts handling due to buggy Contacts API
* Removed permissions for new messages due to buggy Contacts API
* Sync all accounts in background (not only active)

View file

@ -1,5 +1,5 @@
<?xml version="1.0"?>
<manifest package="org.qtproject.friendiqa" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.6.4" android:versionCode="30" android:installLocation="auto">
<manifest package="org.qtproject.friendiqa" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.6.5" android:versionCode="31" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30"/>
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.

View file

@ -224,7 +224,7 @@ void XHR::getlist()
XHR::setUrl(m_filelist.at(dlindex));}
else {
XHR::setUrl(m_filelist.at(dlindex));}
//qDebug() << "start download" << m_url;
qDebug() << "start download" << m_url;
XHR::download();
} else {dlindex=0;m_downloadtype="";m_contactlist.clear();m_filelist.clear();}
}
@ -293,6 +293,7 @@ void XHR::onReplySuccess()
void XHR::onRequestFinished()
{
// Save the file here
//qDebug() << "buffer " << buffer;
if (buffer.isNull()){qDebug() << "File empty"<<m_url; buffer.clear(); emit this->error(m_downloadtype,m_url,m_api,1);}
else if (m_downloadtype=="picturelist") {
QJsonDocument jsonResponse = QJsonDocument::fromJson(buffer);

View file

@ -59,7 +59,7 @@ function friendicaPostRequest(login,api,data,method,rootwindow,callback) {
//print(api+JSON.stringify(login)+Qt.atob(login.password));
if (xhrequest.readyState === XMLHttpRequest.HEADERS_RECEIVED) {
} else if(xhrequest.readyState === XMLHttpRequest.DONE) {
try{ if (xhrequest.responseText!=""){
try{ if (xhrequest.responseText!=""){print (xhrequest.responseText)
callback(xhrequest.responseText)
}else{//print("API:\n" +api+" NO RESPONSE");
//showMessage("Error","API:\n" +api+" NO RESPONSE",rootwindow)

View file

@ -54,7 +54,8 @@ function dataRequest(login,photo,database,xhr,rootwindow) {
// check if image exist and call download function
Helperjs.friendicaRequest(login,"/api/friendica/photo?photo_id="+photo.id, rootwindow, function (image){
if(image==""){currentimageno=currentimageno+1}else{
if(image=="" || typeof(image)=="undefined"){currentimageno=currentimageno+1}else{
try{
var obj = JSON.parse(image);
if (obj.hasOwnProperty('status')){
@ -109,6 +110,30 @@ function dataRequest(login,photo,database,xhr,rootwindow) {
}
})
}} catch (e){
var helpfilename=photo.filename.substring(0,photo.filename.lastIndexOf("."));
var filesuffix="";
if (photo.type=="image/jpeg"){filesuffix=".jpg"}
else if (photo.type=="image/png"){filesuffix=".png"}
else {filesuffix=""}
if (helpfilename==""){// check if file has any filename
photo.filename=photo["id"]+filesuffix;
}
else{photo.filename=helpfilename+filesuffix}
var link="";
xhr.setUrl(Qt.resolvedUrl(photo.thumb));
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setFilename(login.imagestore+'albums/'+photo.album+"/"+photo["filename"]);
xhr.setDownloadtype("picture");
xhr.download();
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
db.transaction( function(tx) {
var result = tx.executeSql('SELECT * from imageData where id = "'+photo["id"]+'"');
if(result.rows.length === 1) {// use update
result = tx.executeSql('UPDATE imageData SET username ="' +login.username+ '",id="'+photo.id+'", created="'+photo.created+'", edited="'+photo.edited+'", profile="0", link="'+photo["thumb"]+'", filename="'+photo.filename+'",title="", desc="'+photo.desc+'", type="'+photo.type+'", width="0", height="0", album="'+photo.album+'", location="file://'+login.imagestore+'albums/'+photo.album+'/" where id="'+photo["id"]+'"');
} else {// use insert print('... does not exists, create it')
result = tx.executeSql('INSERT INTO imageData VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)', [login.username,photo.id,photo.created,photo.edited,'', photo.desc, photo.album, photo.filename, photo.type, '', '',0,photo["thumb"],'file://'+login.imagestore+'albums/'+photo.album+"/"]);
}
})
print("Data retrieval failure! "+ e+obj);
}
}})

View file

@ -344,19 +344,19 @@ function deleteNews(login,database,newsid,messagetype,rootwindow,callback){
})}
function retweetNews(login,database,newsid,rootwindow,callback){
Helperjs.friendicaPostRequest(login,"/api/statuses/retweet?id="+newsid,"","POST", rootwindow,function (obj){
Helperjs.friendicaPostRequest(login,"/api/v1/statuses/"+newsid+"/reblog","","POST", rootwindow,function (obj){
var answer=JSON.parse(obj);
if(answer.hasOwnProperty('status'))//('error' in answer.status)
{Helperjs.showMessage("Repost",answer.status.code,rootwindow);}
else{Helperjs.showMessage("Repost",answer.text,rootwindow)}
else{Helperjs.showMessage("Repost",answer.content,rootwindow)}
})
}
function favorite(login,favorited,newsid,rootwindow){
// toggle favorites
if(favorited){ Helperjs.friendicaPostRequest(login,"/api/favorites/create?id="+newsid,"","POST", rootwindow,function (obj){
if(favorited){ Helperjs.friendicaPostRequest(login,"/api/v1/statuses/"+newsid+"/bookmark","","POST", rootwindow,function (obj){
})}
else {Helperjs.friendicaPostRequest(login,"/api/favorites/destroy?id="+newsid,"","POST",rootwindow,function (obj){
else {Helperjs.friendicaPostRequest(login,"/api/v1/statuses/"+newsid+"/unbookmark","","POST",rootwindow,function (obj){
})}
}

View file

@ -455,7 +455,7 @@ function processNews(api,data){
usermessages.push(newslist.status);
newslist=usermessages;
}
if (data==""){newsBusy.running=false}
if (data=="" || api=="/api/v1/statuses"){print("data "+data); newsBusy.running=false}
else if (typeof(newslist)=='undefined'){
Helperjs.showMessage(qsTr("Undefined Array Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root)
}

View file

@ -82,6 +82,12 @@ var html=[//Smileys
'\ud83d\ude4E',
'\ud83d\ude4F',
'\ud83e\udd2F',
'\uD83D\uDC4D',
'\u2764\uFE0F',
'\uD83D\uDCA9',
'\uD83D\uDC2D',
'\uD83D\uDC2E',
'\uD83D\uDC31',
'\u2639',
'\u263B',
//Weather
@ -125,557 +131,557 @@ var html=[//Smileys
'\u262F',
'\u26EA',
'\u26E9'
]
]
var core=[
{name:'&lt;3',url:
'qrc:///images/smileys/core/smiley-heart.gif'},
{name:'&lt;3',url:
'qrc:///images/smileys/core/smiley-heart.gif'},
{name:'&lt;/3',url:
'qrc:///images/smileys/core/smiley-brokenheart.gif'},
{name:'&lt;/3',url:
'qrc:///images/smileys/core/smiley-brokenheart.gif'},
{name:':-)',url:
'qrc:///images/smileys/core/smiley-smile.gif'},
{name:':-)',url:
'qrc:///images/smileys/core/smiley-smile.gif'},
{name:';-)',url:
'qrc:///images/smileys/core/smiley-wink.gif'},
{name:';-)',url:
'qrc:///images/smileys/core/smiley-wink.gif'},
{name:':-(',url:
'qrc:///images/smileys/core/smiley-frown.gif'},
{name:':-(',url:
'qrc:///images/smileys/core/smiley-frown.gif'},
{name:':-P',url:
'qrc:///images/smileys/core/smiley-tongue-out.gif'},
{name:':-P',url:
'qrc:///images/smileys/core/smiley-tongue-out.gif'},
{name:':-X',url:
'qrc:///images/smileys/core/smiley-kiss.gif'},
{name:':-X',url:
'qrc:///images/smileys/core/smiley-kiss.gif'},
{name:':-D',url:
'qrc:///images/smileys/core/smiley-laughing.gif'},
{name:':-D',url:
'qrc:///images/smileys/core/smiley-laughing.gif'},
{name:':-O',url:
'qrc:///images/smileys/core/smiley-surprised.gif'},
{name:':-O',url:
'qrc:///images/smileys/core/smiley-surprised.gif'},
{name:'\\o/',url:
'qrc:///images/smileys/core/smiley-thumbsup.gif'},
{name:'\\o/',url:
'qrc:///images/smileys/core/smiley-thumbsup.gif'},
{name:'o.O',url:
'qrc:///images/smileys/core/smiley-Oo.gif'},
{name:'o.O',url:
'qrc:///images/smileys/core/smiley-Oo.gif'},
{name:":'(",url:
'qrc:///images/smileys/core/smiley-cry.gif'},
{name:":'(",url:
'qrc:///images/smileys/core/smiley-cry.gif'},
{name:":-!",url:
'qrc:///images/smileys/core/smiley-foot-in-mouth.gif'},
{name:":-!",url:
'qrc:///images/smileys/core/smiley-foot-in-mouth.gif'},
{name:":-/",url:
'qrc:///images/smileys/core/smiley-undecided.gif'},
{name:":-/",url:
'qrc:///images/smileys/core/smiley-undecided.gif'},
{name:":-[",url:
'qrc:///images/smileys/core/smiley-embarassed.gif'},
{name:":-[",url:
'qrc:///images/smileys/core/smiley-embarassed.gif'},
{name:"8-)",url:
'qrc:///images/smileys/core/smiley-cool.gif'},
{name:"8-)",url:
'qrc:///images/smileys/core/smiley-cool.gif'},
{name:':beer',url:
'qrc:///images/smileys/core/beer_mug.gif'},
{name:':beer',url:
'qrc:///images/smileys/core/beer_mug.gif'},
{name:':coffee',url:
'qrc:///images/smileys/core/coffee.gif'},
{name:':coffee',url:
'qrc:///images/smileys/core/coffee.gif'},
{name:':facepalm',url:
'qrc:///images/smileys/core/smiley-facepalm.gif'},
{name:':facepalm',url:
'qrc:///images/smileys/core/smiley-facepalm.gif'},
{name:':like',url:
'qrc:///images/smileys/core/like.gif'},
{name:':like',url:
'qrc:///images/smileys/core/like.gif'},
{name:':dislike',url:
'qrc:///images/smileys/core/dislike.gif'},
{name:':dislike',url:
'qrc:///images/smileys/core/dislike.gif'},
{name:'~friendica',url:
'qrc:///images/smileys/core/friendica-16.png'},
{name:'~friendica',url:
'qrc:///images/smileys/core/friendica-16.png'},
{name:'red#',url:
'qrc:///images/smileys/core/rm-16.png'}
]
{name:'red#',url:
'qrc:///images/smileys/core/rm-16.png'}
]
var addon=[
{name:':bunnyflowers',url:
'qrc:///images/smileys/animals/bunnyflowers.gif'},
{name:':bunnyflowers',url:
'qrc:///images/smileys/animals/bunnyflowers.gif'},
{name:':chick',url:
'qrc:///images/smileys/animals/chick.gif'},
'qrc:///images/smileys/animals/chick.gif'},
{name:':bumblebee',url:
'qrc:///images/smileys/animals/bee.gif'},
'qrc:///images/smileys/animals/bee.gif'},
{name:':ladybird',url:
'qrc:///images/smileys/animals/ladybird.gif'},
'qrc:///images/smileys/animals/ladybird.gif'},
{name:':bigspider',url:
'qrc:///images/smileys/animals/bigspider.gif' },
'qrc:///images/smileys/animals/bigspider.gif' },
{name:':cat',url:
'qrc:///images/smileys/animals/cat.gif'},
'qrc:///images/smileys/animals/cat.gif'},
{name:':bunny',url:
'qrc:///images/smileys/animals/bunny.gif' },
'qrc:///images/smileys/animals/bunny.gif' },
{name:':cow',url:
'qrc:///images/smileys/animals/cow.gif' },
'qrc:///images/smileys/animals/cow.gif' },
{name:':crab',url:
'qrc:///images/smileys/animals/crab.gif' },
'qrc:///images/smileys/animals/crab.gif' },
{name:':dolphin',url:
'qrc:///images/smileys/animals/dolphin.gif' },
'qrc:///images/smileys/animals/dolphin.gif' },
{name:':dragonfly',url:
'qrc:///images/smileys/animals/dragonfly.gif' },
'qrc:///images/smileys/animals/dragonfly.gif' },
{name:':frog',url:
'qrc:///images/smileys/animals/frog.gif'},
'qrc:///images/smileys/animals/frog.gif'},
{name:':hamster',url:
'qrc:///images/smileys/animals/hamster.gif' },
'qrc:///images/smileys/animals/hamster.gif' },
{name:':monkey',url:
'qrc:///images/smileys/animals/monkey.gif' },
'qrc:///images/smileys/animals/monkey.gif' },
{name:':horse',url:
'qrc:///images/smileys/animals/horse.gif' },
'qrc:///images/smileys/animals/horse.gif' },
{name:':parrot',url:
'qrc:///images/smileys/animals/parrot.gif' },
'qrc:///images/smileys/animals/parrot.gif' },
{name:':tux',url:
'qrc:///images/smileys/animals/tux.gif' },
'qrc:///images/smileys/animals/tux.gif' },
{name:':snail',url:
'qrc:///images/smileys/animals/snail.gif' },
'qrc:///images/smileys/animals/snail.gif' },
{name:':sheep',url:
'qrc:///images/smileys/animals/sheep.gif' },
'qrc:///images/smileys/animals/sheep.gif' },
{name:':dog',url:
'qrc:///images/smileys/animals/dog.gif'},
'qrc:///images/smileys/animals/dog.gif'},
{name:':elephant',url:
'qrc:///images/smileys/animals/elephant.gif' },
'qrc:///images/smileys/animals/elephant.gif' },
{name:':fish',url:
'qrc:///images/smileys/animals/fish.gif' },
'qrc:///images/smileys/animals/fish.gif' },
{name:':giraffe',url:
'qrc:///images/smileys/animals/giraffe.gif' },
'qrc:///images/smileys/animals/giraffe.gif' },
{name:':pig',url:
'qrc:///images/smileys/animals/pig.gif'},
'qrc:///images/smileys/animals/pig.gif'},
//Baby
//Baby
{name:':baby',url:
'qrc:///images/smileys/babies/baby.gif' },
'qrc:///images/smileys/babies/baby.gif' },
{name:':babycot',url:
'qrc:///images/smileys/babies/babycot.gif' },
'qrc:///images/smileys/babies/babycot.gif' },
{name:':pregnant',url:
'qrc:///images/smileys/babies/pregnant.gif' },
'qrc:///images/smileys/babies/pregnant.gif' },
{name:':stork',url:
'qrc:///images/smileys/babies/stork.gif' },
'qrc:///images/smileys/babies/stork.gif' },
//Confused
//Confused
{name:':confused',url:
'qrc:///images/smileys/confused/confused.gif' },
'qrc:///images/smileys/confused/confused.gif' },
{name:':shrug',url:
'qrc:///images/smileys/confused/shrug.gif' },
'qrc:///images/smileys/confused/shrug.gif' },
{name:':stupid',url:
'qrc:///images/smileys/confused/stupid.gif' },
'qrc:///images/smileys/confused/stupid.gif' },
{name:':dazed',url:
'qrc:///images/smileys/confused/dazed.gif' },
//Cool 'qrc:///images/smileys
'qrc:///images/smileys/confused/dazed.gif' },
//Cool 'qrc:///images/smileys
{name:':affro',url:
'qrc:///images/smileys/cool/affro.gif'},
'qrc:///images/smileys/cool/affro.gif'},
//Devil/Angel
//Devil/Angel
{name:':angel',url:
'qrc:///images/smileys/devilangel/angel.gif'},
'qrc:///images/smileys/devilangel/angel.gif'},
{name:':cherub',url:
'qrc:///images/smileys/devilangel/cherub.gif'},
'qrc:///images/smileys/devilangel/cherub.gif'},
{name:':devilangel',url:
'qrc:///images/smileys/devilangel/blondedevil.gif' },
'qrc:///images/smileys/devilangel/blondedevil.gif' },
{name:':catdevil',url:
'qrc:///images/smileys/devilangel/catdevil.gif'},
'qrc:///images/smileys/devilangel/catdevil.gif'},
{name:':devillish',url:
'qrc:///images/smileys/devilangel/devil.gif'},
'qrc:///images/smileys/devilangel/devil.gif'},
{name:':daseesaw',url:
'qrc:///images/smileys/devilangel/daseesaw.gif'},
'qrc:///images/smileys/devilangel/daseesaw.gif'},
{name:':turnevil',url:
'qrc:///images/smileys/devilangel/turnevil.gif' },
'qrc:///images/smileys/devilangel/turnevil.gif' },
{name:':saint',url:
'qrc:///images/smileys/devilangel/saint.gif'},
'qrc:///images/smileys/devilangel/saint.gif'},
{name:':graveside',url:
'qrc:///images/smileys/devilangel/graveside.gif'},
'qrc:///images/smileys/devilangel/graveside.gif'},
//Unpleasent
//Unpleasent
{name:':toilet',url:
'qrc:///images/smileys/disgust/toilet.gif'},
'qrc:///images/smileys/disgust/toilet.gif'},
{name:':fartinbed',url:
'qrc:///images/smileys/disgust/fartinbed.gif' },
'qrc:///images/smileys/disgust/fartinbed.gif' },
{name:':fartblush',url:
'qrc:///images/smileys/disgust/fartblush.gif' },
'qrc:///images/smileys/disgust/fartblush.gif' },
//Drinks
//Drinks
{name:':tea',url:
'qrc:///images/smileys/drink/tea.gif' },
'qrc:///images/smileys/drink/tea.gif' },
{name:':drool',url:
'qrc:///images/smileys/drool/drool.gif'},
'qrc:///images/smileys/drool/drool.gif'},
//Sad
//Sad
{name:':crying',url:
'qrc:///images/smileys/sad/crying.png'},
'qrc:///images/smileys/sad/crying.png'},
{name:':prisoner',url:
'qrc:///images/smileys/sad/prisoner.gif' },
'qrc:///images/smileys/sad/prisoner.gif' },
{name:':sigh',url:
'qrc:///images/smileys/sad/sigh.gif'},
'qrc:///images/smileys/sad/sigh.gif'},
//Smoking - only one smiley in here, maybe it needs moving elsewhere?
//Smoking - only one smiley in here, maybe it needs moving elsewhere?
{name:':smoking',url:
'qrc:///images/smileys/smoking/smoking.gif'},
'qrc:///images/smileys/smoking/smoking.gif'},
//Sport
//Sport
{name:':basketball',url:
'qrc:///images/smileys/sport/basketball.gif'},
'qrc:///images/smileys/sport/basketball.gif'},
{name:':bowling',url:
'qrc:///images/smileys/sport/bowling.gif'},
'qrc:///images/smileys/sport/bowling.gif'},
{name:':cycling',url:
'qrc:///images/smileys/sport/cycling.gif'},
'qrc:///images/smileys/sport/cycling.gif'},
{name:':darts',url:
'qrc:///images/smileys/sport/darts.gif'},
'qrc:///images/smileys/sport/darts.gif'},
{name:':fencing',url:
'qrc:///images/smileys/sport/fencing.gif' },
'qrc:///images/smileys/sport/fencing.gif' },
{name:':juggling',url:
'qrc:///images/smileys/sport/juggling.gif'},
'qrc:///images/smileys/sport/juggling.gif'},
{name:':skipping',url:
'qrc:///images/smileys/sport/skipping.gif'},
'qrc:///images/smileys/sport/skipping.gif'},
{name:':archery',url:
'qrc:///images/smileys/sport/archery.gif'},
'qrc:///images/smileys/sport/archery.gif'},
{name:':surfing',url:
'qrc:///images/smileys/sport/surfing.gif' },
'qrc:///images/smileys/sport/surfing.gif' },
{name:':snooker',url:
'qrc:///images/smileys/sport/snooker.gif' },
'qrc:///images/smileys/sport/snooker.gif' },
{name:':horseriding',url:
'qrc:///images/smileys/sport/horseriding.gif'},
'qrc:///images/smileys/sport/horseriding.gif'},
//Love
//Love
{name:':iloveyou',url:
'qrc:///images/smileys/love/iloveyou.gif'},
'qrc:///images/smileys/love/iloveyou.gif'},
{name:':inlove',url:
'qrc:///images/smileys/love/inlove.gif'},
'qrc:///images/smileys/love/inlove.gif'},
{name:':~love',url:
'qrc:///images/smileys/love/love.gif' },
'qrc:///images/smileys/love/love.gif' },
{name:':lovebear',url:
'qrc:///images/smileys/love/lovebear.gif'},
'qrc:///images/smileys/love/lovebear.gif'},
{name:':lovebed',url:
'qrc:///images/smileys/love/lovebed.gif' },
'qrc:///images/smileys/love/lovebed.gif' },
{name:':loveheart',url:
'qrc:///images/smileys/love/loveheart.gif' },
'qrc:///images/smileys/love/loveheart.gif' },
//Tired/Sleep
//Tired/Sleep
{name:':countsheep',url:
'qrc:///images/smileys/tired/countsheep.gif' },
'qrc:///images/smileys/tired/countsheep.gif' },
{name:':hammock',url:
'qrc:///images/smileys/tired/hammock.gif'},
'qrc:///images/smileys/tired/hammock.gif'},
{name:':pillow',url:
'qrc:///images/smileys/tired/pillow.gif' },
'qrc:///images/smileys/tired/pillow.gif' },
{name:':yawn',url:
'qrc:///images/smileys/tired/yawn.gif'},
'qrc:///images/smileys/tired/yawn.gif'},
//Fight/Flame/Violent
//Fight/Flame/Violent
{name:':2guns',url:
'qrc:///images/smileys/fight/2guns.gif' },
'qrc:///images/smileys/fight/2guns.gif' },
{name:':alienfight',url:
'qrc:///images/smileys/fight/alienfight.gif' },
'qrc:///images/smileys/fight/alienfight.gif' },
{name:':army',url:
'qrc:///images/smileys/fight/army.gif'},
'qrc:///images/smileys/fight/army.gif'},
{name:':arrowhead',url:
'qrc:///images/smileys/fight/arrowhead.gif'},
'qrc:///images/smileys/fight/arrowhead.gif'},
{name:':bfg',url:
'qrc:///images/smileys/fight/bfg.gif' },
'qrc:///images/smileys/fight/bfg.gif' },
{name:':bowman',url:
'qrc:///images/smileys/fight/bowman.gif' },
'qrc:///images/smileys/fight/bowman.gif' },
{name:':chainsaw',url:
'qrc:///images/smileys/fight/chainsaw.gif'},
'qrc:///images/smileys/fight/chainsaw.gif'},
{name:':crossbow',url:
'qrc:///images/smileys/fight/crossbow.gif'},
'qrc:///images/smileys/fight/crossbow.gif'},
{name:':crusader',url:
'qrc:///images/smileys/fight/crusader.gif' },
'qrc:///images/smileys/fight/crusader.gif' },
{name:':dead',url:
'qrc:///images/smileys/fight/dead.gif' },
'qrc:///images/smileys/fight/dead.gif' },
{name:':hammersplat',url:
'qrc:///images/smileys/fight/hammersplat.gif' },
'qrc:///images/smileys/fight/hammersplat.gif' },
{name:':lasergun',url:
'qrc:///images/smileys/fight/lasergun.gif' },
'qrc:///images/smileys/fight/lasergun.gif' },
{name:':machinegun',url:
'qrc:///images/smileys/fight/machinegun.gif' },
'qrc:///images/smileys/fight/machinegun.gif' },
{name:':acid',url:
'qrc:///images/smileys/fight/acid.gif' },
'qrc:///images/smileys/fight/acid.gif' },
//Fantasy - monsters and dragons fantasy. The other type of fantasy belongs in adult
//Fantasy - monsters and dragons fantasy. The other type of fantasy belongs in adult
{name:':alienmonster',url:
'qrc:///images/smileys/fantasy/alienmonster.gif' },
'qrc:///images/smileys/fantasy/alienmonster.gif' },
{name:':barbarian',url:
'qrc:///images/smileys/fantasy/barbarian.gif' },
'qrc:///images/smileys/fantasy/barbarian.gif' },
{name:':dinosaur',url:
'qrc:///images/smileys/fantasy/dinosaur.gif'},
'qrc:///images/smileys/fantasy/dinosaur.gif'},
{name:':dragon',url:
'qrc:///images/smileys/fantasy/dragon.gif'},
'qrc:///images/smileys/fantasy/dragon.gif'},
{name:':draco',url:
'qrc:///images/smileys/fantasy/dragonwhelp.gif'},
'qrc:///images/smileys/fantasy/dragonwhelp.gif'},
{name:':ghost',url:
'qrc:///images/smileys/fantasy/ghost.gif'},
'qrc:///images/smileys/fantasy/ghost.gif'},
{name:':mummy',url:
'qrc:///images/smileys/fantasy/mummy.gif'},
'qrc:///images/smileys/fantasy/mummy.gif'},
//Food
//Food
{name:':apple',url:
'qrc:///images/smileys/food/apple.gif' },
'qrc:///images/smileys/food/apple.gif' },
{name:':broccoli',url:
'qrc:///images/smileys/food/broccoli.gif' },
'qrc:///images/smileys/food/broccoli.gif' },
{name:':cake',url:
'qrc:///images/smileys/food/cake.gif'},
'qrc:///images/smileys/food/cake.gif'},
{name:':carrot',url:
'qrc:///images/smileys/food/carrot.gif' },
'qrc:///images/smileys/food/carrot.gif' },
{name:':popcorn',url:
'qrc:///images/smileys/food/popcorn.gif'},
'qrc:///images/smileys/food/popcorn.gif'},
{name:':tomato',url:
'qrc:///images/smileys/food/tomato.gif'},
'qrc:///images/smileys/food/tomato.gif'},
{name:':banana',url:
'qrc:///images/smileys/food/banana.gif'},
'qrc:///images/smileys/food/banana.gif'},
{name:':cooking',url:
'qrc:///images/smileys/food/cooking.gif'},
'qrc:///images/smileys/food/cooking.gif'},
{name:':fryegg',url:
'qrc:///images/smileys/food/fryegg.gif'},
'qrc:///images/smileys/food/fryegg.gif'},
{name:':birthdaycake',url:
'qrc:///images/smileys/food/birthdaycake.gif'},
'qrc:///images/smileys/food/birthdaycake.gif'},
//Happy
//Happy
{name:':cloud9',url:
'qrc:///images/smileys/happy/cloud9.gif'},
'qrc:///images/smileys/happy/cloud9.gif'},
{name:':tearsofjoy',url:
'qrc:///images/smileys/happy/tearsofjoy.gif' },
'qrc:///images/smileys/happy/tearsofjoy.gif' },
//Repsect
//Repsect
{name:':bow',url:
'qrc:///images/smileys/respect/bow.gif'},
'qrc:///images/smileys/respect/bow.gif'},
{name:':bravo',url:
'qrc:///images/smileys/respect/bravo.gif'},
'qrc:///images/smileys/respect/bravo.gif'},
{name:':hailking',url:
'qrc:///images/smileys/respect/hailking.gif'},
'qrc:///images/smileys/respect/hailking.gif'},
{name:':number1',url:
'qrc:///images/smileys/respect/number1.gif' },
'qrc:///images/smileys/respect/number1.gif' },
//Laugh
//Laugh
{name:':hahaha',url:
'qrc:///images/smileys/laugh/hahaha.gif'},
'qrc:///images/smileys/laugh/hahaha.gif'},
{name:':loltv',url:
'qrc:///images/smileys/laugh/loltv.gif' },
'qrc:///images/smileys/laugh/loltv.gif' },
{name:':rofl',url:
'qrc:///images/smileys/laugh/rofl.gif'},
'qrc:///images/smileys/laugh/rofl.gif'},
//Music
//Music
{name:':drums',url:
'qrc:///images/smileys/music/drums.gif'},
'qrc:///images/smileys/music/drums.gif'},
{name:':guitar',url:
'qrc:///images/smileys/music/guitar.gif'},
'qrc:///images/smileys/music/guitar.gif'},
{name:':trumpet',url:
'qrc:///images/smileys/music/trumpet.gif' },
'qrc:///images/smileys/music/trumpet.gif' },
//smileys that used to be in core
//smileys that used to be in core
{name:':headbang',url:
'qrc:///images/smileys/oldcore/headbang.gif'},
'qrc:///images/smileys/oldcore/headbang.gif'},
{name:':beard',url:
'qrc:///images/smileys/oldcore/beard.png'},
'qrc:///images/smileys/oldcore/beard.png'},
{name:':whitebeard',url:
'qrc:///images/smileys/oldcore/whitebeard.png'},
'qrc:///images/smileys/oldcore/whitebeard.png'},
{name:':shaka',url:
'qrc:///images/smileys/oldcore/shaka.gif'},
'qrc:///images/smileys/oldcore/shaka.gif'},
{name:':\\.../',url:
'qrc:///images/smileys/oldcore/shaka.gif'},
'qrc:///images/smileys/oldcore/shaka.gif'},
{name:':\\ooo/',url:
'qrc:///images/smileys/oldcore/shaka.gif' },
'qrc:///images/smileys/oldcore/shaka.gif' },
{name:':headdesk',url:
'qrc:///images/smileys/oldcore/headbang.gif' },
'qrc:///images/smileys/oldcore/headbang.gif' },
//These two are still in core, so oldcore isn't strictly right, but we don't want too many directories
//These two are still in core, so oldcore isn't strictly right, but we don't want too many directories
{name:':-d',url:
'qrc:///images/smileys/oldcore/laughing.gif'},
'qrc:///images/smileys/oldcore/laughing.gif'},
{name:':-o',url:
'qrc:///images/smileys/oldcore/surprised.gif' },
'qrc:///images/smileys/oldcore/surprised.gif' },
// Regex killers - stick these at the bottom so they appear at the end of the English and
// at the start of $OtherLanguage.
// Regex killers - stick these at the bottom so they appear at the end of the English and
// at the start of $OtherLanguage.
{name:':cool',url:
'qrc:///images/smileys/cool/cool.gif' },
'qrc:///images/smileys/cool/cool.gif' },
{name:':vomit',url:
'qrc:///images/smileys/disgust/vomit.gif' },
'qrc:///images/smileys/disgust/vomit.gif' },
{name:':golf',url:
'qrc:///images/smileys/sport/golf.gif' },
'qrc:///images/smileys/sport/golf.gif' },
{name:':football',url:
'qrc:///images/smileys/sport/football.gif'},
'qrc:///images/smileys/sport/football.gif'},
{name:':tennis',url:
'qrc:///images/smileys/sport/tennis.gif' },
'qrc:///images/smileys/sport/tennis.gif' },
{name:':alpha',url:
'qrc:///images/smileys/fight/alpha.png' },
'qrc:///images/smileys/fight/alpha.png' },
{name:':marine',url:
'qrc:///images/smileys/fight/marine.gif' },
'qrc:///images/smileys/fight/marine.gif' },
{name:':sabre',url:
'qrc:///images/smileys/fight/sabre.gif' },
'qrc:///images/smileys/fight/sabre.gif' },
{name:':tank',url:
'qrc:///images/smileys/fight/tank.gif' },
'qrc:///images/smileys/fight/tank.gif' },
{name:':viking',url:
'qrc:///images/smileys/fight/viking.gif' },
'qrc:///images/smileys/fight/viking.gif' },
{name:':gangs',url:
'qrc:///images/smileys/fight/gangs.gif' },
'qrc:///images/smileys/fight/gangs.gif' },
{name:':dj',url:
'qrc:///images/smileys/music/dj.gif'},
'qrc:///images/smileys/music/dj.gif'},
{name:':elvis',url:
'qrc:///images/smileys/music/elvis.gif'},
'qrc:///images/smileys/music/elvis.gif'},
{name:':violin',url:
'qrc:///images/smileys/music/violin.gif'},
]
'qrc:///images/smileys/music/violin.gif'},
]
var adult=[
{
name:'(o)(o) ',url:
'qrc:///images/smileys/adult/tits.gif'},
{
name:'(o)(o) ',url:
'qrc:///images/smileys/adult/tits.gif'},
{name:'(.)(.) ',url:
'qrc:///images/smileys/adult/tits.gif'},
{name:'(.)(.) ',url:
'qrc:///images/smileys/adult/tits.gif'},
{name:':bong',url:
'qrc:///images/smileys/adult/bong.gif'},
{name:':bong',url:
'qrc:///images/smileys/adult/bong.gif'},
{name:':sperm',url:
'qrc:///images/smileys/adult/sperm.gif'},
{name:':sperm',url:
'qrc:///images/smileys/adult/sperm.gif'},
{name:':drunk',url:
'qrc:///images/smileys/adult/drunk.gif'},
{name:':drunk',url:
'qrc:///images/smileys/adult/drunk.gif'},
{name:':finger',url:
'qrc:///images/smileys/adult/finger.gif'}
]
{name:':finger',url:
'qrc:///images/smileys/adult/finger.gif'}
]

View file

@ -43,7 +43,7 @@ Page{
font.pointSize: osSettings.systemFontSize
color:Material.primaryTextColor
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
text: "<b>Friendiqa v0.6.4 </b><br>Licensed under GPL 3 with the exception of OpenSSL <br> "+
text: "<b>Friendiqa v0.6.5 </b><br>Licensed under GPL 3 with the exception of OpenSSL <br> "+
"Website <a href='https://friendiqa.ma-nic.de'>https://friendiqa.ma-nic.de</a><br>"+
"Sourcecode: <a href='https://git.friendi.ca/LubuWest/Friendiqa'>https://git.friendi.ca/LubuWest/Friendiqa</a><br>"+
"Privacy Policy: <a href='https://git.friendi.ca/lubuwest/Friendiqa/src/branch/master/PrivacyPolicy.md'>http://git.friendi.ca/lubuwest/Friendiqa/src/branch/master/PrivacyPolicy.md</a><br>"+

View file

@ -95,7 +95,7 @@ Page {
//x:3*mm
//y:8*mm
width: conversationList.width//-4*mm
height:conversationList.height//-20*mm
height:conversationList.height-root.fontFactor*osSettings.bigFontSize//-20*mm
clip: true
spacing: 0
footer: MessageSend{conversation:true}

View file

@ -89,9 +89,10 @@ Rectangle{
function statusUpdate(title,status,in_reply_to_status_id,attachImageURL) {
//xhr.url= login.server + "/api/statuses/update.json";
try{newsBusy.running=true;}catch(e){conversationBusy.running=true}
try{newsBusy.running=true;conversationBusy.running=true}catch(e){}
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setUrl(login.server);
if (in_reply_to_status_id==""){
xhr.setApi("/api/statuses/update");
xhr.clearParams();
xhr.setParam("source", "Friendiqa");
@ -107,9 +108,18 @@ Rectangle{
xhr.setImageFileParam("media", attachImageURL[image]);
xhr.setImageFileParam("angle", rotator.angle.toString());
}
};
}
xhr.post();
Newsjs.storeHashtags(login,db,status,root)
}else {
xhr.setApi("/api/v1/statuses");
xhr.clearParams();
xhr.setParam("status", status);
xhr.setParam("in_reply_to_id", in_reply_to_status_id);
xhr.post();
Newsjs.storeHashtags(login,db,status,root)
messageSend.destroy()
}
}
function dmUpdate(title,text,replyto,screen_name,attachImageURL) {
@ -163,10 +173,10 @@ Rectangle{
tagSelector.visible=true
});
}
// Flickable{
// anchors.fill: parent
// contentHeight: messageColumn.height
// boundsBehavior: Flickable.StopAtBounds
// Flickable{
// anchors.fill: parent
// contentHeight: messageColumn.height
// boundsBehavior: Flickable.StopAtBounds
DropArea{
anchors.fill: parent
onDropped: {
@ -379,6 +389,7 @@ Rectangle{
spacing: mm
height: 2.5*root.fontFactor*osSettings.bigFontSize//12*mm
x: 0.5*mm
// MButton{id:permButton //Permissions not working in Friendica 02/2022
// visible: !conversation && (newsSwipeview.stacktype!=="DirectMessages")
// height: 2*root.fontFactor*osSettings.bigFontSize
@ -450,7 +461,10 @@ Rectangle{
var body=bodyField.getFormattedText(0,bodyField.length);
var dmbody=bodyField.getText(0,bodyField.length);
if (conversation || newsSwipeview.stacktype!=="DirectMessages"){
statusUpdate(title,body,parentId,attachImageURLs)
if (parentId!=""){
statusUpdate(title,dmbody,parentId,attachImageURLs)
}else{
statusUpdate(title,body,parentId,attachImageURLs)}
}else {
if (reply_to_user!=""){dmUpdate(title,dmbody,parentId,reply_to_user)}
else{Helperjs.showMessage(qsTr("Error"),qsTr("No receiver supplied!"),root)}
@ -512,6 +526,9 @@ Rectangle{
PropertyChanges {
target: titleField; visible:false
}
PropertyChanges {
target: attachButton; visible:false
}
PropertyChanges {
target: bodyField; placeholderText:"";focus:true
}

View file

@ -48,7 +48,7 @@ Rectangle{
MouseArea {anchors.fill:parent;
onClicked:{
rootstackView.push("qrc:/qml/newsqml/NewsVideoLarge.qml",{"source": attachment.url,"mimetype": attachment.mimetype});
rootstackView.push("qrc:/qml/newsqml/NewsVideoLarge.qml",{"source": Qt.resolvedUrl(attachment.url),"mimetype": attachment.mimetype});
}
}
}

View file

@ -29,8 +29,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtMultimedia 5.8
import QtQuick 2.9
import QtMultimedia 5.15
import QtQuick 2.11
import QtQuick.Controls 2.12
import "qrc:/qml/genericqml"

View file

@ -129,7 +129,8 @@ Item {
font.pointSize: 0.6*osSettings.systemFontSize
font.family: "Noto Sans"
horizontalAlignment: Label.AlignRight
text: (newsitemobject.in_reply_to_status_id!="null"&&newsitemobject.in_reply_to_status_id!=null)?" \u00B7 "+qsTr("In reply to ")+newsitemobject.reply_user.screen_name:" "
//text: (newsitemobject.in_reply_to_status_id!="null"&&newsitemobject.in_reply_to_status_id!=null)?" \u00B7 "+qsTr("In reply to ")+newsitemobject.reply_user.screen_name:" "
text: (newsitemobject.reply_user!=false&&typeof(newsitemobject.reply_user)!="undefined")?" \u00B7 "+qsTr("In reply to ")+newsitemobject.reply_user.screen_name:" "
}
}
}
@ -330,31 +331,31 @@ Item {
}}
}
// CheckBox {
// id:favoritedCheckbox
// visible:((newsitemobject.messagetype==0)||(newsitemobject.messagetype==3))
// width: newsitem.width/5
// height: parent.height
// indicator:Rectangle{
// implicitWidth: newsitem.width/5
// implicitHeight:root.fontFactor*osSettings.bigFontSize
// color:"transparent"
// Text{
// anchors.centerIn: parent
// font.pointSize: osSettings.systemFontSize
// font.family:fontAwesome.name
// color: favoritedCheckbox.checked?Material.primaryTextColor: Material.secondaryTextColor
// text:"\uf005"
// }
// }
// checked:(newsitemobject.favorited>0)
// onClicked:{
// if(favoritedCheckbox.checkState==Qt.Checked){
// Newsjs.favorite(login,true,newsitemobject.id,root); model.newsitemobject.favorited=1}
// else if(favoritedCheckbox.checkState==Qt.Unchecked){
// Newsjs.favorite(login,false,newsitemobject.id,root);model.newsitemobject.favorited=0}
// }
// }
CheckBox {
id:favoritedCheckbox
visible:((newsitemobject.messagetype==0)||(newsitemobject.messagetype==3))
width: newsitem.width/5
height: parent.height
indicator:Rectangle{
implicitWidth: newsitem.width/5
implicitHeight:root.fontFactor*osSettings.bigFontSize
color:"transparent"
Text{
anchors.centerIn: parent
font.pointSize: osSettings.systemFontSize
font.family:fontAwesome.name
color: favoritedCheckbox.checked?Material.primaryTextColor: Material.secondaryTextColor
text:"\uf005"
}
}
checked:(newsitemobject.favorited>0)
onClicked:{
if(favoritedCheckbox.checkState==Qt.Checked){
Newsjs.favorite(login,true,newsitemobject.id,root); model.newsitemobject.favorited=1}
else if(favoritedCheckbox.checkState==Qt.Unchecked){
Newsjs.favorite(login,false,newsitemobject.id,root);model.newsitemobject.favorited=0}
}
}
Rectangle{
width: newsitem.width/5
height: parent.height

View file

@ -58,16 +58,16 @@ StackView{
if(albums.indexOf(fotorectangle.newimages[i].album)==-1){
filesystem.Directory=root.login.imagestore+"/albums";
filesystem.makeDir(fotorectangle.newimages[i].album)}
//ownimagelist.push(root.login.server+"/api/friendica/photo?scale='0'&photo_id="+fotorectangle.newimages[i].id);
ownimagelist.push(root.login.server+"/api/friendica/photo?photo_id="+fotorectangle.newimages[i].id);
}
Imagejs.dataRequest(login,fotorectangle.newimages[0],db,xhr,fotorectangle);
//Imagejs.dataRequest(login,fotorectangle.newimages[0],db,xhr,fotorectangle);
})
// xhr.setLogin(login.username+":"+Qt.atob(login.password));
// xhr.setImagedir(login.imagestore);
// xhr.setFilelist(ownimagelist);
// xhr.setDownloadtype("picturelist");
// xhr.getlist();
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setImagedir(login.imagestore);
print("ownimagelist "+JSON.stringify(ownimagelist))
xhr.setFilelist(ownimagelist);
xhr.setDownloadtype("picturelist");
xhr.getlist();
newImagesProgress.visible=true
}
}
@ -78,7 +78,7 @@ StackView{
fotorectangle.newimages=[];fotorectangle.currentimageno=0
}else{
// download next image
Imagejs.dataRequest(login,fotorectangle.newimages[currentimageno],db,xhr,fotorectangle)
//Imagejs.dataRequest(login,fotorectangle.newimages[currentimageno],db,xhr,fotorectangle)
}
}
@ -95,8 +95,8 @@ StackView{
}
function onError(data,url,api,code){
if(data=="picturelist"){
var requestid=url.substring(url.lastIndexOf("=")+1);
Imagejs.dataRequest(login,requestid,db,xhr,fotorectangle);
// var requestid=api.substring(api.lastIndexOf("=")+1);
// Imagejs.dataRequest(login,requestid,db,xhr,fotorectangle);
fotorectangle.currentimageno=fotorectangle.currentimageno+1
} else if (data=="picture"){
Helperjs.deleteData(root.db,"imageData",root.login.username,function(){