fix #564, increase the allowed event title to 180 characters

This commit is contained in:
tibbi 2018-08-05 21:33:09 +02:00
parent 8c7654e918
commit 17b47bd2d7
3 changed files with 5 additions and 5 deletions

View File

@ -245,8 +245,8 @@ class CalDAVHandler(val context: Context) {
val importId = getCalDAVEventImportId(calendarId, id)
val source = "$CALDAV-$calendarId"
val repeatRule = Parser().parseRepeatInterval(rrule, startTS)
val event = Event(0, startTS, endTS, title, description, reminders.getOrElse(0, { -1 }),
reminders.getOrElse(1, { -1 }), reminders.getOrElse(2, { -1 }), repeatRule.repeatInterval,
val event = Event(0, startTS, endTS, title, description, reminders.getOrElse(0) { -1 },
reminders.getOrElse(1) { -1 }, reminders.getOrElse(2) { -1 }, repeatRule.repeatInterval,
importId, allDay, repeatRule.repeatLimit, repeatRule.repeatRule, eventTypeId, source = source, location = location)
if (event.getIsAllDay()) {

View File

@ -232,7 +232,7 @@ class IcsImporter(val activity: SimpleActivity) {
return if (title.startsWith(";") && title.contains(":")) {
title.substring(title.lastIndexOf(':') + 1)
} else {
title.substring(1, Math.min(title.length, 80))
title.substring(1, Math.min(title.length, 180))
}
}

View File

@ -21,7 +21,7 @@
android:layout_marginTop="@dimen/activity_margin"
android:hint="@string/title"
android:inputType="textCapSentences"
android:maxLength="80"
android:maxLength="180"
android:maxLines="1"
android:minEms="20"
android:textCursorDrawable="@null"
@ -37,7 +37,7 @@
android:layout_toLeftOf="@+id/event_show_on_map"
android:hint="@string/location"
android:inputType="textCapWords"
android:maxLength="80"
android:maxLength="180"
android:maxLines="1"
android:minEms="20"
android:textCursorDrawable="@null"