create and delete events

This commit is contained in:
LubuWest 2022-11-15 22:02:09 +01:00
commit 400241ec6a
34 changed files with 1346 additions and 614 deletions

View file

@ -92,7 +92,7 @@ Rectangle{
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==""){
//if (in_reply_to_status_id==""){
xhr.setApi("/api/statuses/update");
xhr.clearParams();
xhr.setParam("source", "Friendiqa");
@ -111,15 +111,16 @@ Rectangle{
}
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)
// }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()
// }
messageSend.destroy()
}
}
function dmUpdate(title,text,replyto,screen_name,attachImageURL) {
@ -402,7 +403,7 @@ Rectangle{
height: 2*root.fontFactor*osSettings.bigFontSize
width: 2*root.fontFactor*osSettings.bigFontSize
text: "\uf03e"
visible:!conversation?(newsSwipeview.stacktype!="DirectMessages"):true
visible:(newsSwipeview.stacktype!="DirectMessages")
onClicked: {
if (attachImageURLs.length>0){//Server currently accepts only one attachment
Helperjs.showMessage( qsTr("Error"),qsTr("Only one attachment supported at the moment.\n Remove other attachment first!"), messageColumn)
@ -526,9 +527,6 @@ Rectangle{
PropertyChanges {
target: titleField; visible:false
}
PropertyChanges {
target: attachButton; visible:false
}
PropertyChanges {
target: bodyField; placeholderText:"";focus:true
}