Update IcsImporter.kt

This commit is contained in:
SUPYROW 2023-02-26 00:50:21 +01:00 committed by GitHub
parent 9fccd0917d
commit fd61c19995
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -115,7 +115,10 @@ class IcsImporter(val activity: SimpleActivity) {
curTitle = line.substring(SUMMARY.length) curTitle = line.substring(SUMMARY.length)
curTitle = getTitle(curTitle).replace("\\n", "\n").replace("\\,", ",") curTitle = getTitle(curTitle).replace("\\n", "\n").replace("\\,", ",")
} else if (line.startsWith(DESCRIPTION) && !isNotificationDescription) { } else if (line.startsWith(DESCRIPTION) && !isNotificationDescription) {
curDescription = line.substring(DESCRIPTION.length).replace("\\n", "\n").replace("\\,", ",") val match = DESCRIPTION_REGEX.matchEntire(line)
if (match != null) {
curDescription = match.groups[1]?.value?.replace("\\n", "\n")?.replace("\\,", ",") ?: ""
}
if (curDescription.trim().isEmpty()) { if (curDescription.trim().isEmpty()) {
curDescription = "" curDescription = ""
} }