Il Da nella pagina di composizione (0.6.4)
Il campo mittente in Account non arrivava al file di configurazione: il From ora si scrive (e si vede) dove si compone il messaggio, precompilato da Account, e viene salvato per le volte successive.
This commit is contained in:
1 parent
30cb753648
commit
fb789ef823
5 files changed
+51
-10
No files matched your search
@@ -10,10 +10,20 @@ Page {
|
||||
property string copia: ""
|
||||
property string oggetto: ""
|
||||
property string corpo: ""
|
||||
property string mittente: ""
|
||||
|
||||
property bool inviando: false
|
||||
property string errore: ""
|
||||
|
||||
// Il "Da" si vede e si può correggere qui: se il campo in Account non è
|
||||
// stato salvato, l'invio non resta bloccato senza spiegazione.
|
||||
Component.onCompleted: {
|
||||
if (account.mittente.length > 0)
|
||||
page.mittente = account.mittente;
|
||||
else if (account.persona.indexOf("@") > 0)
|
||||
page.mittente = account.persona;
|
||||
}
|
||||
|
||||
SilicaFlickable {
|
||||
anchors.fill: parent
|
||||
contentHeight: colonna.height + Theme.paddingLarge
|
||||
@@ -27,6 +37,19 @@ Page {
|
||||
width: parent.width
|
||||
spacing: Theme.paddingMedium
|
||||
|
||||
TextField {
|
||||
id: campoDa
|
||||
width: parent.width - 2 * Theme.horizontalPageMargin
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
label: qsTr("Da")
|
||||
placeholderText: qsTr("il tuo indirizzo")
|
||||
text: page.mittente
|
||||
inputMethodHints: Qt.ImhEmailCharactersOnly | Qt.ImhNoAutoUppercase
|
||||
EnterKey.enabled: true
|
||||
EnterKey.iconSource: "image://theme/icon-m-enter-next"
|
||||
EnterKey.onClicked: campoA.forceActiveFocus()
|
||||
}
|
||||
|
||||
TextField {
|
||||
id: campoA
|
||||
width: parent.width - 2 * Theme.horizontalPageMargin
|
||||
@@ -128,6 +151,7 @@ Page {
|
||||
function invia() {
|
||||
page.errore = "";
|
||||
const motivo = engine.sendMessage(campoA.text, campoCc.text, "",
|
||||
campoDa.text,
|
||||
campoOggetto.text, campoCorpo.text);
|
||||
if (motivo.length > 0) {
|
||||
page.errore = motivo;
|
||||
|
||||
Reference in new issue
Block a user