1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-26 10:35:50 +01:00

Bangle.js - remove large lines of _____ from calendar (generated by google teams)

This commit is contained in:
Gordon Williams 2024-05-23 09:48:37 +01:00
parent 4edea1ed96
commit 4da5a73cd6

View File

@ -1629,6 +1629,8 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
description = androidx.core.text.HtmlCompat.fromHtml(description, HtmlCompat.FROM_HTML_MODE_LEGACY).toString(); description = androidx.core.text.HtmlCompat.fromHtml(description, HtmlCompat.FROM_HTML_MODE_LEGACY).toString();
// Replace "-::~:~::~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~::~:~::-" lines from Google meet // Replace "-::~:~::~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~::~:~::-" lines from Google meet
description = ("\n"+description+"\n").replaceAll("\n-[:~-]*\n",""); description = ("\n"+description+"\n").replaceAll("\n-[:~-]*\n","");
// Replace ____________________ from MicrosoftTeams
description = description.replaceAll("__________+", "");
// replace double newlines and trim beginning and end // replace double newlines and trim beginning and end
description = description.replaceAll("\n\\s*\n","\n").trim(); description = description.replaceAll("\n\\s*\n","\n").trim();
} }