mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-17 12:20:51 +01:00
fix some glitches with importing event description and location newlines
This commit is contained in:
parent
35d60d8027
commit
3458ed3453
@ -104,6 +104,9 @@ class IcsImporter(val activity: SimpleActivity) {
|
|||||||
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("\\,", ",")
|
curDescription = line.substring(DESCRIPTION.length).replace("\\n", "\n").replace("\\,", ",")
|
||||||
|
if (curDescription.trim().isEmpty()) {
|
||||||
|
curDescription = ""
|
||||||
|
}
|
||||||
isDescription = true
|
isDescription = true
|
||||||
} else if (line.startsWith(UID)) {
|
} else if (line.startsWith(UID)) {
|
||||||
curImportId = line.substring(UID.length).trim()
|
curImportId = line.substring(UID.length).trim()
|
||||||
@ -141,6 +144,9 @@ class IcsImporter(val activity: SimpleActivity) {
|
|||||||
curRepeatExceptions.add(Formatter.getDayCodeFromTS(getTimestamp(value)))
|
curRepeatExceptions.add(Formatter.getDayCodeFromTS(getTimestamp(value)))
|
||||||
} else if (line.startsWith(LOCATION)) {
|
} else if (line.startsWith(LOCATION)) {
|
||||||
curLocation = getLocation(line.substring(LOCATION.length).replace("\\,", ","))
|
curLocation = getLocation(line.substring(LOCATION.length).replace("\\,", ","))
|
||||||
|
if (curLocation.trim().isEmpty()) {
|
||||||
|
curLocation = ""
|
||||||
|
}
|
||||||
} else if (line.startsWith(RECURRENCE_ID)) {
|
} else if (line.startsWith(RECURRENCE_ID)) {
|
||||||
val timestamp = getTimestamp(line.substring(RECURRENCE_ID.length))
|
val timestamp = getTimestamp(line.substring(RECURRENCE_ID.length))
|
||||||
curRecurrenceDayCode = Formatter.getDayCodeFromTS(timestamp)
|
curRecurrenceDayCode = Formatter.getDayCodeFromTS(timestamp)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user