1
0
mirror of https://github.com/etesync/android synced 2024-11-25 17:38:13 +00:00

Upgrade ical4android.

This commit is contained in:
Tom Hacohen 2020-01-09 12:54:22 +02:00
parent 8527ec29d8
commit 5db8545f8f
5 changed files with 9 additions and 9 deletions

View File

@ -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

View File

@ -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

View File

@ -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) {

View File

@ -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()) {

@ -1 +1 @@
Subproject commit 0458700717a1d2190c252b340cfb6ddd2dfbeebd
Subproject commit b5de481b186e38c0894c238fe16a37589e88f2b7