N0ury / ImapNote2

Sync your notes between Android, iOs devices and different accounts like Gmail, iCloud and others
GNU General Public License v3.0
37 stars 31 forks source link

Opening on Android double-spaces the note #2

Closed sentaidigital closed 9 years ago

sentaidigital commented 9 years ago

Thanks for a great app. This app removes one of the obstacles blocking my move to Android.

However, f I create a note in iOS (see ios-7-before.png), the lines are single spaced. When I open it in ImapNotes2 on an Android 4.4.2 device, the note becomes double spaced. If I look at the note again on iOS, the note is double spaced there, too. Once the note is converted to a double spaced format, iOS will not restore the note back to single spaced. In OS X 10.8, the Notes app looks right, but also does not restore the note back to single spaced.

Looking at the raw source of the message in the IMAP mailbox, the single spaced notes use one DIV per line, the double spaced use one P per line.

is it possible to maintain the line styles, DIV or P?

ios-7-before android ios-7-after

N0ury commented 9 years ago

Hi,

Thanks for your feedback. I've made some changes. Before publishing them, would it be possible for you to do some tests. I've put a new apk in bin directory. If tests are ok, I'll publish this version in Google play.

Thanks in advance

Regards

nbenm

sentaidigital commented 9 years ago

Close. This is a note created by imapnote2:

Date: Tue, 21 Apr 2015 10:41:04 -0400 (EDT)
Message-ID: <1115193720.3.1429627264417.JavaMail.root@localhost>
Subject: test note
MIME-Version: 1.0
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Uniform-Type-Identifier: com.apple.mail-note
X-Universally-Unique-Identifier: 39cae6bd-504e-45df-aa43-acce52bdf735

<html><head></head><body><p dir="ltr">test note</div><div>yet another <u>test</u></div>
</body></html>

It starts with a P tag, but uses DIVs after that.

This is one created by my iPhone 4S (iOS7):

From franklin@elfie.org  Tue Apr 21 15:15:26 2015
Content-Type: text/html;
    charset=utf-8
Content-Transfer-Encoding: 7bit
Subject: Note sourced on iPhone
From: John Franklin <franklin@elfie.org>
X-Universally-Unique-Identifier: 2474B30A-1A2C-4731-AF9E-18DDC592BD36
X-Uniform-Type-Identifier: com.apple.mail-note
Message-Id: <B8A36B1F-027C-4EB7-A13E-F1200BDB9594@elfie.org>
Date: Tue, 21 Apr 2015 11:15:26 -0400
X-Mail-Created-Date: Tue, 21 Apr 2015 11:15:26 -0400
Mime-Version: 1.0 (iOS/7.1.2 \(11D257\) dataaccessd/1.0)
X-UID: 706
Status: RO
X-Keywords:                                                                       
Content-Length: 63

Note sourced on iPhone&nbsp;<div>Line 2</div><div>Line 3</div>

Note it doesn't even bother with an HTML heading. Just text and DIVs.

After editing the previous note with ImapNotes2:

From franklin@elfie.org  Tue Apr 21 15:16:48 2015
Date: Tue, 21 Apr 2015 11:16:48 -0400 (EDT)
Message-ID: <1112604664.4.1429629408051.JavaMail.root@localhost>
Subject: =?UTF-8?Q?Note_sourced_on_iPhone=C2=A0_?=
MIME-Version: 1.0
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Uniform-Type-Identifier: com.apple.mail-note
X-Universally-Unique-Identifier: fa8179e3-aae6-438c-a1bf-6d68a0330da0
X-UID: 707
Status: O
X-Keywords:                                                                      
Content-Length: 194

<html><head></head><body><p dir="ltr">Note sourced on iPhone&#160; </div>
<p dir="ltr">Line 2 </div>
<p dir="ltr">Line 3 </div>
<p dir="ltr">line added by <u>imapnotes2</u></div>
</body></html>

That's a mess. DIVs are converted to Ps, but closed as DIVs.

N0ury commented 9 years ago

The string "ltr". is surrounded by quotes in your test. There weren't any in mine. Can you please try the new apk. I see another problem, a space is added at end of lines in edited notes. I'll correct it later, it's less important.

Thanks in advance

Regards

nbenm

sentaidigital commented 9 years ago

Another test:

Original iPhone Note:

From franklin@elfie.org  Tue Apr 21 16:29:59 2015
Content-Type: text/html;
    charset=utf-8
Content-Transfer-Encoding: 7bit
Subject: Another note
From: John Franklin <franklin@elfie.org>
X-Universally-Unique-Identifier: E1EC2F4A-9185-4860-9B49-D0E8CB308139
X-Uniform-Type-Identifier: com.apple.mail-note
Message-Id: <E454A743-B6E2-471D-AE70-7785784487BD@elfie.org>
Date: Tue, 21 Apr 2015 12:29:59 -0400
X-Mail-Created-Date: Tue, 21 Apr 2015 12:29:59 -0400
Mime-Version: 1.0 (iOS/7.1.2 \(11D257\) dataaccessd/1.0)
X-UID: 711
Status: RO
X-Keywords:                                                                       
Content-Length: 61

Another note<div>iPhone line 1</div><div>iPhone line 2</div>

After edits on IMAPNotes2:

From franklin@elfie.org  Tue Apr 21 16:32:03 2015
Date: Tue, 21 Apr 2015 12:32:03 -0400 (EDT)
Message-ID: <1111536208.1.1429633923162.JavaMail.root@localhost>
Subject: Another note
MIME-Version: 1.0
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Uniform-Type-Identifier: com.apple.mail-note
X-Universally-Unique-Identifier: 9cac48d9-156c-41f5-9966-05932e5edd7f
X-UID: 712
Status: O
X-Keywords:                                                                      
Content-Length: 195

<html><head></head><body><p dir="ltr">Another note </div>
<p dir="ltr">iPhone line 1 </div>
<p dir="ltr">iPhone line 2 </div><div>Android line 1</div><div>Android line 2<br></div>
</body></html>

Looks like new lines added use the proper DIV tags, but the old lines are still P tags. It may be added during import as the lines are double-spaced in ImapNote2 when I first open the note.

A note created only on Android:

From franklin@elfie.org  Tue Apr 21 16:33:42 2015
Date: Tue, 21 Apr 2015 12:33:42 -0400 (EDT)
Message-ID: <1114130984.2.1429634022777.JavaMail.root@localhost>
Subject: android note
MIME-Version: 1.0
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Uniform-Type-Identifier: com.apple.mail-note
X-Universally-Unique-Identifier: 005449d5-b813-4992-9a99-7c71fb4f5e6b
X-UID: 713
Status: O
X-Keywords:                                                                      
Content-Length: 115

<html><head></head><body><p dir="ltr">android note</div><div>a note created on <u>Android</u></div>
</body></html>

The notes start with P tags, even when created by ImapNote2

N0ury commented 9 years ago

Sorry, did it too fast. I'm working blindly, you are my eyes... Hope this time it will work. A new apk is in bin dir.

Thanks for your efforts

Regards

nbenm

ps:this apk contains debugging features. In case of problem, you can have more informations with a "adb logcat"

N0ury commented 9 years ago

I'm closing this issue. If you have yet any problem let me know.

sentaidigital commented 9 years ago

Still does the same:

From franklin@elfie.org  Sun Apr 26 18:04:42 2015
Date: Sun, 26 Apr 2015 14:04:42 -0400 (EDT)
Message-ID: <1114764752.0.1430071482339.JavaMail.root@localhost>
Subject: iPhone note
MIME-Version: 1.0
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Uniform-Type-Identifier: com.apple.mail-note
X-Universally-Unique-Identifier: 960f03c4-f124-4d03-a523-10cb0a6577f5
X-UID: 718
Status: O
X-Keywords:                                                                      
Content-Length: 126

<html><head></head><body><p dir="ltr">iPhone note </div>
<p dir="ltr">Line 1 </div>
<p dir="ltr">Line 2 </div>
</body></html>

Where is the P tag coming from? Why is it closing with a /DIV, not a /P?

sentaidigital commented 9 years ago

can you add a menu to the app with an About... popup? Just so I know I'm running the right version.

N0ury commented 9 years ago

I reopen the issue. I'm going to add a mean for you to know which version is being used. To avoid disturbing other people, I'll put it on my own server, and give you the URL when it will be available.

Regards

N0ury commented 9 years ago

Hi,

You can download last version at http://www.dagami.org/downloads/imapnote2.apk It should be v2.22. At startup, when on the notes list the first time, version number is displayed in a Toast (a small popup) during some seconds. It's enough to read it. Can you please install it and try it on a new note.

Thanks in advance

Regards

sentaidigital commented 9 years ago

Much better. I've been trying to update the app by copying it to my OwnCloud folder. The Android OwnCloud client may or may not have been refreshing the IPK.

The Android version likes to underline new text, but the spacing is correct. Here is what I see when the note is saved by ImapNote2:

From franklin@elfie.org Sun Apr 26 22:09:18 2015 Date: Sun, 26 Apr 2015 18:09:18 -0400 (EDT) Message-ID: 1110040784.0.1430086158615.JavaMail.root@localhost Subject: Another new note MIME-Version: 1.0 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit X-Uniform-Type-Identifier: com.apple.mail-note X-Universally-Unique-Identifier: 5cfb9896-676e-4c81-afef-39615771b2a3 X-UID: 720 Status: O X-Keywords:
Content-Length: 135

Another new note
New line 
Feh
success

jf

John Franklin franklin@sentaidigital.com

On Apr 26, 2015, at 6:04 PM, nbenm notifications@github.com wrote:

Hi,

You can download last version at http://www.dagami.org/downloads/imapnote2.apk It should be v2.22. At startup, when on the notes list the first time, version number is displayed in a Toast (a small popup) during some seconds. It's enough to read it. Can you please install it and try it on a new note.

Thanks in advance

Regards

— Reply to this email directly or view it on GitHub.

N0ury commented 9 years ago

Happy to see it works now.

About the underlined text, can you please tell me what Android version and what device you use. Do you use any app to help you typing ?

Regards

sentaidigital commented 9 years ago

Samsung Galaxy S3 Kit-Kat 4.4.2 Stock Samsung Keyboard

jf

John Franklin franklin@sentaidigital.com

On Apr 27, 2015, at 2:04 AM, nbenm notifications@github.com wrote:

Happy to see it works now.

About the underlined text, can you please tell me what Android version and what device you use. Do you use any app to help you typing ?

Regards

— Reply to this email directly or view it on GitHub.

N0ury commented 9 years ago

Hi John,

I've put a new apk at http://www.dagami.org/downloads/imapnote2_2.23.apk Version number can be checked with a new about menu item, available in the Notes list screen. Can you please try it and tell me if the and tags (underline) have disappeared. I cannot reproduce this behavior on my phone, or with android emulator.

Thanks again for the time you spend.

Regards

N0ury commented 9 years ago

Hi John,

Have you tried the last apk to see if it solves the underline problem

Regards

sentaidigital commented 9 years ago

it does seem to be coming from the keyboard. Specifically, if I have Predictive Text enabled, the word I'm currently typing will be underlined. As soon as I hit space or punctuation, that "closes" the word and the underline goes away. If I don't "close" the word before saving, the underline remains and is saved in the note.

The keyboard I'm using is the default Samsung keyboard. Galaxy S3, Kit-Kat 4.4.2, ImapNote2 2.23.

jf

On Apr 29, 2015, at 5:09 PM, nbenm notifications@github.com wrote:

Hi John,

Have you tried the last apk to see if it solves the underline problem

Regards

— Reply to this email directly or view it on GitHub.

John Franklin franklin@sentaidigital.com

N0ury commented 9 years ago

Hi John,

Thanks for this information. Indeed, this is a "normal" behavior. While a word is beeing typed and predictive text is enabled, this word is physically underlined in the EditText. So if the note is saved at that moment, the word will remain underlined.

I think there's no more to do for this issue.

Please tell me if you are ok to close it.

Regards

sentaidigital commented 9 years ago

The underline behavior belongs in a separate issue, anyway. Go ahead and close this one.