new_version icon indicating copy to clipboard operation
new_version copied to clipboard

How to break line notes version?

Open mdmota opened this issue 4 years ago • 8 comments

\n dont work

mdmota avatar Oct 25 '21 15:10 mdmota

Both the title and description of your issue are extremely vague. Could you provide more information about what the issue is?

vxern avatar Dec 13 '21 10:12 vxern

when my version news description has a line break, the plugin doesn't recognize and show correctly.

In play store: WHAT'S NEW ● XXXXXXXXXXXXXXX; ● YYYYYYYYYYYYYY; ● ZZZZZZZZZZZZZZZ;

In plugin dialog: ● XXXXXXXXXXXXXXX;● YYYYYYYYYYYYYY;● ZZZZZZZZZZZZZZZ;

mdmota avatar Dec 13 '21 13:12 mdmota

Oh, you're showing a custom dialog and displaying the release notes. This is tricky because the play store actually inserts <br> elements between lines, instead of returning a string with \n in it. We'd have to detect the <br>s and convert them to \n

timtraversy avatar Dec 19 '21 14:12 timtraversy

Oh, you're showing a custom dialog and displaying the release notes. This is tricky because the play store actually inserts <br> elements between lines, instead of returning a string with \n in it. We'd have to detect the <br>s and convert them to \n

bro can u give an example. I tried this method
_dialogText.replaceAll('<br>', '\n'); not working for me

iamjithinjohnson avatar Jan 05 '22 17:01 iamjithinjohnson

Sorry what I mean is that the Play Store text element looks like this:

New feature X
<br>
New feature Y

When I scrape this text, I only collect the plain text: New feature X New feature Y.

I'd have to update the plugin to recognize <br> elements and replace them with \n

timtraversy avatar Jan 06 '22 03:01 timtraversy

ok. Thank you for your quick response

iamjithinjohnson avatar Jan 06 '22 04:01 iamjithinjohnson

Hi, is there any update on this? Thanks

zenkog avatar Feb 28 '22 04:02 zenkog

I'm using this method for now. hope I can give you an idea.

Example releaseNotes value: 
- description 1. - description 2. - description 3.
List<String> releaseNotesList = [];
releaseNotesList = status.releaseNotes!.split('.');
dialogText = releaseNotesList.join('.\n').trim();
Example output: 
- description 1.
- description 2. 
- description 3.

yenyichau avatar May 23 '22 08:05 yenyichau