Version 0.002 code cleanup and event attending

This commit is contained in:
LubuWest 2017-01-29 17:26:09 +01:00
commit d8186978e7
42 changed files with 925 additions and 968 deletions

View file

@ -1,7 +1,7 @@
// message.qml
// message with buttons
import QtQuick 2.0
import QtQml 2.2
//import QtQml 2.2
import QtQuick.Controls 1.3
import QtQuick.Dialogs 1.2
import "qrc:/js/helper.js" as Helperjs
@ -13,7 +13,6 @@ Flickable{
contentHeight: messageColumn.height
boundsBehavior: Flickable.StopAtBounds
id:messageSend
//property var login
property string parentId: ""
property string reply_to_user:""
property string attachImageURL: "";
@ -135,7 +134,6 @@ Flickable{
if (attachImageURL!=""){
Helperjs.showMessage( qsTr("Error"),qsTr("Only one attachment. Remove other attachment first!"), messageColumn)}
else{
try{imageAttachmentObject.destroy()}catch(e){print(e)}
imageAttachmentDialog.open()}
}
}
@ -156,28 +154,25 @@ Flickable{
id: cancelButton
text: qsTr("Cancel")
onClicked: {newstab.newstabstatus=login.newsViewType;
newsStack.pop()}
newsStack.pop()}
}
BlueButton {
id: sendButton
text: qsTr("Send")
onClicked: {
//print("login: "+login.server+login.username);
var title=titleField.text.replace("\"","\'");
var body=bodyField.getText(0,bodyField.length);
if (directmessage==0){
statusUpdate(title,body,messageSend.parentId,attachImageURL.toString())}
else {dmUpdate(title,body,"",messageSend.reply_to_user) }
newsStack.pop()
newstab.newstabstatus=login.newsViewType; newsStack.pop()
}
}
}
}
}
FileDialog {
FileDialog {
id: imageAttachmentDialog
title: "Please choose a picture"
folder: shortcuts.pictures
@ -192,8 +187,5 @@ newsStack.pop()}
else{attachImageURL=imageAttachmentDialog.fileUrl;}
}
onRejected: {
//console.log("Canceled")
}
}
}