diff --git a/app/src/main/java/com/etesync/syncadapter/syncadapter/CalendarSyncManager.kt b/app/src/main/java/com/etesync/syncadapter/syncadapter/CalendarSyncManager.kt index b192a118..566789c9 100644 --- a/app/src/main/java/com/etesync/syncadapter/syncadapter/CalendarSyncManager.kt +++ b/app/src/main/java/com/etesync/syncadapter/syncadapter/CalendarSyncManager.kt @@ -81,7 +81,7 @@ constructor(context: Context, account: Account, settings: AccountSettings, extra override fun processSyncEntryImpl(cEntry: SyncEntry) { val inputReader = StringReader(cEntry.content) - val events = Event.fromReader(inputReader) + val events = Event.eventsFromReader(inputReader) if (events.size == 0) { Logger.log.warning("Received VCard without data, ignoring") return diff --git a/app/src/main/java/com/etesync/syncadapter/syncadapter/TasksSyncManager.kt b/app/src/main/java/com/etesync/syncadapter/syncadapter/TasksSyncManager.kt index 2d2f22bc..13b84de6 100644 --- a/app/src/main/java/com/etesync/syncadapter/syncadapter/TasksSyncManager.kt +++ b/app/src/main/java/com/etesync/syncadapter/syncadapter/TasksSyncManager.kt @@ -71,7 +71,7 @@ class TasksSyncManager( override fun processSyncEntryImpl(cEntry: SyncEntry) { val inputReader = StringReader(cEntry.content) - val tasks = Task.fromReader(inputReader) + val tasks = Task.tasksFromReader(inputReader) if (tasks.size == 0) { Logger.log.warning("Received VCard without data, ignoring") return diff --git a/app/src/main/java/com/etesync/syncadapter/ui/JournalItemActivity.kt b/app/src/main/java/com/etesync/syncadapter/ui/JournalItemActivity.kt index 0cf66369..9601cbde 100644 --- a/app/src/main/java/com/etesync/syncadapter/ui/JournalItemActivity.kt +++ b/app/src/main/java/com/etesync/syncadapter/ui/JournalItemActivity.kt @@ -106,7 +106,7 @@ class JournalItemActivity : BaseActivity(), Refreshable { CollectionInfo.Type.CALENDAR -> { val provider = contentResolver.acquireContentProviderClient(CalendarContract.CONTENT_URI)!! val localCalendar = LocalCalendar.findByName(account, provider, LocalCalendar.Factory, info.uid!!)!! - val event = Event.fromReader(StringReader(syncEntry.content))[0] + val event = Event.eventsFromReader(StringReader(syncEntry.content))[0] var localEvent = localCalendar.findByUid(event.uid!!) if (localEvent != null) { localEvent.updateAsDirty(event) @@ -118,7 +118,7 @@ class JournalItemActivity : BaseActivity(), Refreshable { CollectionInfo.Type.TASKS -> { val provider = TaskProvider.acquire(this, TaskProvider.ProviderName.OpenTasks)!! val localTaskList = LocalTaskList.findByName(account, provider, LocalTaskList.Factory, info.uid!!)!! - val task = Task.fromReader(StringReader(syncEntry.content))[0] + val task = Task.tasksFromReader(StringReader(syncEntry.content))[0] var localTask = localTaskList.findByUid(task.uid!!) if (localTask != null) { localTask.updateAsDirty(task) @@ -245,7 +245,7 @@ class JournalItemActivity : BaseActivity(), Refreshable { val inputReader = StringReader(syncEntry.content) try { - event = Event.fromReader(inputReader, null)[0] + event = Event.eventsFromReader(inputReader, null)[0] } catch (e: InvalidCalendarException) { e.printStackTrace() } catch (e: IOException) { @@ -316,7 +316,7 @@ class JournalItemActivity : BaseActivity(), Refreshable { val inputReader = StringReader(syncEntry.content) try { - task = Task.fromReader(inputReader)[0] + task = Task.tasksFromReader(inputReader)[0] } catch (e: InvalidCalendarException) { e.printStackTrace() } catch (e: IOException) { diff --git a/app/src/main/java/com/etesync/syncadapter/ui/importlocal/ImportFragment.kt b/app/src/main/java/com/etesync/syncadapter/ui/importlocal/ImportFragment.kt index 717602c8..7a35a04a 100644 --- a/app/src/main/java/com/etesync/syncadapter/ui/importlocal/ImportFragment.kt +++ b/app/src/main/java/com/etesync/syncadapter/ui/importlocal/ImportFragment.kt @@ -216,7 +216,7 @@ class ImportFragment : DialogFragment() { val importReader = InputStreamReader(inputStream) if (info.type == CollectionInfo.Type.CALENDAR) { - val events = Event.fromReader(importReader, null) + val events = Event.eventsFromReader(importReader, null) importReader.close() if (events.isEmpty()) { @@ -269,7 +269,7 @@ class ImportFragment : DialogFragment() { entryProcessed() } } else if (info.type == CollectionInfo.Type.TASKS) { - val tasks = Task.fromReader(importReader) + val tasks = Task.tasksFromReader(importReader) importReader.close() if (tasks.isEmpty()) { diff --git a/ical4android b/ical4android index 04587007..b5de481b 160000 --- a/ical4android +++ b/ical4android @@ -1 +1 @@ -Subproject commit 0458700717a1d2190c252b340cfb6ddd2dfbeebd +Subproject commit b5de481b186e38c0894c238fe16a37589e88f2b7