Author Topic: How Do I Edit Drafts Started on Another Device?  (Read 13424 times)

Kenneth Evans

  • Newbie
  • *
  • Posts: 13
How Do I Edit Drafts Started on Another Device?
« on: January 23, 2013, 10:14:41 pm »
How do I edit drafts started on another device in AquaMail?  For my Gmail account [Gmail]/Drafts is mapped to [Unsent messages].  That folder includes drafts that were started with AquaMail and ones that were started elsewhere.  I have not noticed any way to distinguish one from the other in the UI.  The problem is that while I can edit the ones started on this device by tapping on the message, I cannot edit the ones started on another device.

In the latter case, it starts a new message with the text in the draft as a quote and the message body is blank.  In other words, it works like Reply or Forward.  Also "Answer inline" doesn't work.

It is important to me to be able to edit all the drafts.  I can do that in Gmail either online or the app and in Thunderbird, which I use on my PC.  Am I missing something?

This is on a Galaxy Note 10.1.

Thanks.

Kenneth Evans

  • Newbie
  • *
  • Posts: 13
Re: How Do I Edit Drafts Started on Another Device?
« Reply #1 on: July 22, 2013, 08:50:45 pm »
Anyone?

Thomas

  • Sr. Member
  • ****
  • Posts: 282
  • Just enjoying life...
Re: How Do I Edit Drafts Started on Another Device?
« Reply #2 on: July 23, 2013, 02:49:07 am »
Just checked that out. You are right.
When i want to go on with a draft in AquaMail which was created for example on Gmail Webpage they are shown as quoted text in the AquaMail editor. Seams to be a bug!?

Let´s see what Kostya has to say.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: How Do I Edit Drafts Started on Another Device?
« Reply #3 on: July 25, 2013, 02:54:30 am »
The UI is the same as for quoted messages, but if you look closely, there is no actual quoting going on. There is no additional prefix on the subject (e.g. "Re:" or "Fwd:") and no added indentation in the message text.

When sending, the app will merge the new and old content. Or you can press the Edit button (on the right side, between the new and old content) and edit both in place.

The reason for this is lack of a good HTML editor, so I'm doing it this way just in case the existing draft is HTML (and same way if the draft is plain text for consistency).

So, given the above, should I throw away HTML content from exiting drafts? Seems like a loss, since the app can merge new text/plain content with existing text/html content when sending, preserving e.g. inline images and formatting that was there.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

Thomas

  • Sr. Member
  • ****
  • Posts: 282
  • Just enjoying life...
Re: How Do I Edit Drafts Started on Another Device?
« Reply #4 on: July 25, 2013, 03:18:30 am »
Ah, learned something again regarding handling on AM. Like the way you handle it.

Kenneth Evans

  • Newbie
  • *
  • Posts: 13
Re: How Do I Edit Drafts Started on Another Device?
« Reply #5 on: August 05, 2013, 08:43:06 pm »
Kosta, Thanks for the response.

1. The messages in question I have in the Drafts folder are almost always in HTML, usually created in Thunderbird.  (The ones I create in Aquamail are not a problem and can be edited time and again.  But they are not in HTML, so links are not live, for example, and bold is not available.)

2. I almost always don't Send them.  I keep them there as notes that can be edited.  (They are mostly web links to things I am researching.)  Just my way of doing things.  8)

3. When I do the Edit option, it does not show the original.  So it looks to me as if you are throwing away the HTML.  I never accepted the edits for fear of losing the original, so I don't know what happens with the merge. In any event you can't edit both in place AFAICT.

I checked 3. again just now (with the latest update).  The old contents did not appear in the edit window.  I did save this time, and it, in fact did lose the original content.  So it isn't doing what you said (or what one would like).

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: How Do I Edit Drafts Started on Another Device?
« Reply #6 on: August 06, 2013, 02:48:07 am »
The existing content should show in the area below, where quoted text usually is (when replying, etc.)

Thunderbird has a way to view message source -- can you check if your drafts have both text/html and text/plain parts? They should, with same content (sans formatting for text/plain of course).

Are these messages large? Did you see indication of the app loading from the server as you opened them?



Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

Kenneth Evans

  • Newbie
  • *
  • Posts: 13
Re: How Do I Edit Drafts Started on Another Device?
« Reply #7 on: August 06, 2013, 05:08:26 am »
The existing formatted text shows below when you view the message (if quote original is checked).  It does not show after you press Edit, and it is lost when you save your edits.

The messages I checked in Thunderbird appear to be all HTML.  They start and end with <html> and </html> and everything appears to be between markup tags.  Content-Type: text/html.  I don't see more than one part and one mime type.

The messages are not large in almost all cases, usually a few lines, much less than a printed page.  They almost never have images, just words and links.

This is happening on a Galaxy Note 10.1 tablet.  (I am not currently using Aquamail on my phone with a smaller screen.  Not that I don't like it, I just never took the time to change what I had originally.)  I mostly read email on the tablet.

I don't know what you mean by "app loading from the server".  I don't typically have Gmail open, except to cure "too many simultaneous connections".  The messages appear or update fairly soon after they are saved elsewhere.

Later:  I don't usually edit email in Aquamail that starts as HTML.  I did that just now and saved in Aquamail.  (I just entered some text and did not use Edit.)  In Aquamail it has the upper part with the new text and the old part with the original HTML when I reopen the draft (the same as it looked when I did Save).  It looks about the same in Thunderbird.  In Thunderbird it is now Content-Type: text/html; charset="us-ascii".  I can, however,  edit it in Thunderbird as HTML; e.g., the bold icon is available as it would not be if it were plain text.  The Aquamail line is before <head>.  The first few lines are :

...
MIME-Version: 1.0
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: 8bit

<html>
<body text="#000000" bgcolor="#ffffff">
<p>This is a line entered in Aquamail before doing Save.<br>
</p>
<br><p>

  <head>

   
  </head>
 
    <br>
    <p> <b>Genesis UV Map (Texture Template)</b><br>
...

I hope this helps.  Thanks for your interest.  Let me know if there is something else I can do.

Kenneth Evans

  • Newbie
  • *
  • Posts: 13
Re: How Do I Edit Drafts Started on Another Device?
« Reply #8 on: August 07, 2013, 08:06:54 pm »
OK.  I did some more experimenting.  The problem is with the Edit when in [Drafts].  It throws away everything that was in the lower panel (the quoted text).

In contrast, if I forward an HTML message and do Edit, then it shows the message with (apparently) things it can't handle, such as images removed.  This does allow some editing.  Actually in my case where these messages are mostly text and links, it allows me to edit just about everything.  I do lose the formatting, but in the absence of an HTML editor, that is as much as can be expected.

So if I have two identical messages in the Inbox and in [Drafts] then when ising the Edit button, it works as described for forwarding from the Inbox but does not work in [Drafts].

BTW in Thunderbird you can arrange to have the same message in the Inbox and Drafts as it allows you to copy from the Inbox to elsewhere, including Drafts, something AFAICT Aquamail doesn't allow.   It does seem to allow move to [Drafts], which my current phone email client does not do.  Probably reason to change to Aquamail there.  ;)

I also note that Thunderbird, in displaying the message, puts links on things that look like links even when the mail is in plain text.  This is useful.  Maybe Aquamail could do this as an option.  It allows you to to go to links without the pain of copying them and then pasting them into your browser.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: How Do I Edit Drafts Started on Another Device?
« Reply #9 on: August 14, 2013, 03:04:30 am »
Kenneth,

Thank you for such a detailed write-up. I do have Thunderbird installed and will try to reproduce the lost text issue.

( it's strange that there is no text/plain part in the drafts it created, but... oh well... )

As far as links in plain text messages go, I'm surprised you don't see them highlighted... They should be when viewing an incoming message, or in the quoted part when composing / editing a draft (but not in the actual edit area).
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: How Do I Edit Drafts Started on Another Device?
« Reply #10 on: August 15, 2013, 01:21:33 am »
Kenneth,

I worked on this today.

Yes, formatted drafts saved by Thunderbird are lacking a text/plain part, you were absolutely right about that.

I already had code to handle this case, extracting text content out of html, but there was a bug in it.

This version should work for you:

http://www.aqua-mail.com/forum/index.php?topic=1470.0
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

Kenneth Evans

  • Newbie
  • *
  • Posts: 13
Re: How Do I Edit Drafts Started on Another Device?
« Reply #11 on: August 15, 2013, 04:41:52 am »
Kostya,

Unfortunately I replied to this post in the wrong place (where the download is).  I am repeating it here.  Sorry.

I just downloaded the new version and a quick check indicates it fixes the problem.  The Edit button appears to work.  Thanks.

As to the links: If the links were underlined and live in [Drafts] that would solve most of my remaining problems.  Recall that, as stated above, I mostly use my drafts for notes.  I seldom send them.  They usually consist mainly of links to topics I have researched and want to get back to.  The fact they are not live means I have to copy and paste them into the browser rather than just clicking on them.

In Thunderbird, when I view the draft (even if is in plain text as would be the case if created in Aquamail) the links are underlined and active (unlike in Aquamail).  When I edit it, the plain text ones are not underlined (the same as happens in Aquamail).  So, if there were a way to make them be underlined in Aquamail when viewing but not editing, that would be awesome for me and duplicate what happens in Thunderbird. 

I realize this may not be a standard thing to do, but it is very useful.

I also realize Aquamail doesn't operate the same way as Thunderbird; e.g., you can edit the draft in Aquamail without going into Edit.  I'm not familiar enough with the internals of Aquamail to suggest how this might be done, but perhaps you can think of a way.  It would certainly help me.

I have now installed Aquamail on my phone.  I previously was using K-9 Mail.  (I have paid for both of them BTW.)  IMHO Aquamail is much better.  I should have done it long ago.  8)

Thanks for all you help.  Aquamail is an excellent product.


Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: How Do I Edit Drafts Started on Another Device?
« Reply #12 on: August 20, 2013, 01:48:50 am »
Kenneth,

Yes, you're right about some internal differences.

Thunderbird has an HTML rendering / editing component from the Mozilla foundation (it's also one of the reasons it takes so much disk and memory space).

I'm using a standard Android text editor that's full of bugs and inconsistencies. For example:

https://code.google.com/p/android/issues/detail?id=59130

It is possible to highlight links while editing -- after all, the system spell checker does something similar for its misspelled highlight / suggestion list, but it's just difficult (at least for me, at this point). I'm also wary of introducing serious bugs here.

Will keep it in mind, though, thanks for the suggestions!

And while we're on the topic of HTML handling... I need to highlight phone numbers in all messages (so they too can be just tapped) and do a better job at highlighting links. Started to write an HTML lexer a few days ago (since the ones I could find were too slow and used too much memory), so this might help me with links in the editor too.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

Kenneth Evans

  • Newbie
  • *
  • Posts: 13
Re: How Do I Edit Drafts Started on Another Device?
« Reply #13 on: August 20, 2013, 04:34:23 am »
Kostya,

I understand.  Thanks for all you have done.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: How Do I Edit Drafts Started on Another Device?
« Reply #14 on: August 25, 2013, 02:45:21 am »
Kenneth,

I'm starting to get an idea on how to implement this (as I'm learning more about Android's text editor internals, as a side effect of working on rich text editing).

Will spend more time on this in the future, but it won't be in the upcoming release (it might interfere with rich text editing, so I'd rather keep things separated for ease of troubleshooting / debugging, just in case).
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/