remove "}" from EXDATE for now

This commit is contained in:
tibbi 2017-12-01 12:33:42 +01:00
parent 749c2e5326
commit 07b3e418a6
2 changed files with 7 additions and 3 deletions

View File

@ -35,7 +35,7 @@ import java.text.SimpleDateFormat
import java.util.*
fun Context.updateWidgets() {
val widgetsCnt = AppWidgetManager.getInstance(applicationContext).getAppWidgetIds(ComponentName(this, MyWidgetMonthlyProvider::class.java))
val widgetsCnt = AppWidgetManager.getInstance(applicationContext).getAppWidgetIds(ComponentName(applicationContext, MyWidgetMonthlyProvider::class.java))
if (widgetsCnt.isNotEmpty()) {
val ids = intArrayOf(R.xml.widget_monthly_info)
Intent(applicationContext, MyWidgetMonthlyProvider::class.java).apply {
@ -49,7 +49,7 @@ fun Context.updateWidgets() {
}
fun Context.updateListWidget() {
val widgetsCnt = AppWidgetManager.getInstance(applicationContext).getAppWidgetIds(ComponentName(this, MyWidgetListProvider::class.java))
val widgetsCnt = AppWidgetManager.getInstance(applicationContext).getAppWidgetIds(ComponentName(applicationContext, MyWidgetListProvider::class.java))
if (widgetsCnt.isNotEmpty()) {
val ids = intArrayOf(R.xml.widget_list_info)
Intent(applicationContext, MyWidgetListProvider::class.java).apply {

View File

@ -92,7 +92,11 @@ class IcsImporter {
} else if (line.startsWith(LAST_MODIFIED)) {
curLastModified = getTimestamp(line.substring(LAST_MODIFIED.length)) * 1000L
} else if (line.startsWith(EXDATE)) {
curRepeatExceptions.add(getTimestamp(line.substring(EXDATE.length)))
var value = line.substring(EXDATE.length)
if (value.endsWith('}'))
value = value.substring(0, value.length - 1)
curRepeatExceptions.add(getTimestamp(value))
} else if (line.startsWith(LOCATION)) {
curLocation = line.substring(LOCATION.length)
} else if (line == END_ALARM) {